Options for form were not passed through

This commit is contained in:
Benjamin Paap 2015-10-26 11:08:32 +01:00
parent f8b038faf2
commit 490a9081ec

View File

@ -306,16 +306,16 @@ class FormTypeParser implements ParserInterface
return $refl->newInstance();
}
private function createForm($item)
private function createForm($item, $data = null, array $options = [])
{
if ($this->implementsType($item)) {
$type = $this->getTypeInstance($item);
return $this->formFactory->create($type);
return $this->formFactory->create($type, $data, $options);
}
try {
return $this->formFactory->create($item);
return $this->formFactory->create($item, $data, $options);
} catch (UnexpectedTypeException $e) {
// nothing
} catch (InvalidArgumentException $e) {