Fix parse of input forms with options required

When form like model type was parsed this pass the required 'class' option to enable the build of the class
This commit is contained in:
Cedric LOMBARDOT 2014-04-11 09:45:35 +00:00
parent fd126c1a01
commit 4181079d8b

View File

@ -104,7 +104,7 @@ class FormTypeParser implements ParserInterface
$bestType = sprintf('array of %ss', $this->mapTypes[$config->getOption('type')]);
} else {
// Embedded form collection
$subParameters = $this->parseForm($this->formFactory->create($config->getOption('type')), $name . '[]');
$subParameters = $this->parseForm($this->formFactory->create($config->getOption('type'), null, $config->getOption('options', array())), $name . '[]');
$parameters = array_merge($parameters, $subParameters);
continue 2;