Pass children options to subform

This commit is contained in:
pedro 2015-03-16 11:12:26 +01:00
parent d8c05dbf57
commit ff38cd4568

View File

@ -126,6 +126,7 @@ class FormTypeParser implements ParserInterface
$parameters = array(); $parameters = array();
foreach ($form as $name => $child) { foreach ($form as $name => $child) {
$config = $child->getConfig(); $config = $child->getConfig();
$options = $config->getOptions();
$bestType = ''; $bestType = '';
$actualType = null; $actualType = null;
$subType = null; $subType = null;
@ -171,7 +172,7 @@ class FormTypeParser implements ParserInterface
*/ */
$addDefault = false; $addDefault = false;
try { try {
$subForm = $this->formFactory->create($type); $subForm = $this->formFactory->create($type, null, $options);
$subParameters = $this->parseForm($subForm, $name); $subParameters = $this->parseForm($subForm, $name);
if (!empty($subParameters)) { if (!empty($subParameters)) {