[Form] Revert changes impacting perfomance and readability
This commit is contained in:
parent
b709551252
commit
07fa82dff1
@ -75,6 +75,11 @@ class FieldType extends AbstractType
|
||||
$fullName = $name;
|
||||
}
|
||||
|
||||
$types = array();
|
||||
foreach ($form->getTypes() as $type) {
|
||||
$types[] = $type->getName();
|
||||
}
|
||||
|
||||
$view
|
||||
->set('form', $view)
|
||||
->set('id', $id)
|
||||
@ -90,7 +95,7 @@ class FieldType extends AbstractType
|
||||
->set('label', $form->getAttribute('label'))
|
||||
->set('multipart', false)
|
||||
->set('attr', array())
|
||||
->set('types', array_map(function ($type) { return $type->getName(); }, $form->getTypes()))
|
||||
->set('types', $types)
|
||||
;
|
||||
}
|
||||
|
||||
|
@ -916,7 +916,11 @@ class Form implements \IteratorAggregate, FormInterface
|
||||
}
|
||||
}
|
||||
|
||||
$childViews = array_map(function ($child) use ($view) { return $child->createView($view); }, $this->children);
|
||||
$childViews = array();
|
||||
|
||||
foreach ($this->children as $key => $child) {
|
||||
$childViews[$key] = $child->createView($view);
|
||||
}
|
||||
|
||||
if (null !== $prototype = $view->get('prototype')) {
|
||||
$protoView = $prototype->getForm()->createView($view);
|
||||
|
Reference in New Issue
Block a user