$options['auto_initialize'
] = false;
if (null ===
$type && null ===
$this->config->
getDataClass()) { $type = TextType::
class;
} if (null ===
$type) { $child =
$this->config->
getFormFactory()->
createForProperty($this->config->
getDataClass(),
$child, null,
$options);
} else { $child =
$this->config->
getFormFactory()->
createNamed($child,
$type, null,
$options);
} } elseif ($child->
getConfig()->
getAutoInitialize()) { throw new RuntimeException(sprintf('Automatic initialization is only supported on root forms. You should set the "auto_initialize" option to false on the field "%s".',
$child->
getName()));
} $this->children
[$child->
getName()] =
$child;
$child->
setParent($this);
// If setData() is currently being called, there is no need to call
// mapDataToForms() here, as mapDataToForms() is called at the end
// of setData() anyway. Not doing this check leads to an endless
// recursion when initializing the form lazily and an event listener