[Form] Simplify the code
This commit is contained in:
parent
4e3e2768fb
commit
9ec99608df
@ -907,7 +907,6 @@ class Form implements \IteratorAggregate, FormInterface
|
|||||||
$view->setParent($parent);
|
$view->setParent($parent);
|
||||||
|
|
||||||
$types = (array) $this->types;
|
$types = (array) $this->types;
|
||||||
$childViews = array();
|
|
||||||
|
|
||||||
foreach ($types as $type) {
|
foreach ($types as $type) {
|
||||||
$type->buildView($view, $this);
|
$type->buildView($view, $this);
|
||||||
@ -917,9 +916,7 @@ class Form implements \IteratorAggregate, FormInterface
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach ($this->children as $key => $child) {
|
$childViews = array_map(function ($child) use ($view) { return $child->createView($view); }, $this->children);
|
||||||
$childViews[$key] = $child->createView($view);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (null !== $prototype = $view->get('prototype')) {
|
if (null !== $prototype = $view->get('prototype')) {
|
||||||
$protoView = $prototype->getForm()->createView($view);
|
$protoView = $prototype->getForm()->createView($view);
|
||||||
|
Reference in New Issue
Block a user