minor #18456 [Form] Remove unnecessary option assignment (sergeyfedotov)
This PR was merged into the 2.3 branch.
Discussion
----------
[Form] Remove unnecessary option assignment
| Q | A
| ------------- | ---
| Branch? | 2.3
| Bug fix? | no
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Option assignment is not required because the prototype inherits this option from the parent form via standard inheritance mechanism.
Related pull requests: #16959, #18317
Commits
-------
da8a197
Remove unnecessary option assignment
This commit is contained in:
commit
e251e36467
@ -28,7 +28,6 @@ class CollectionType extends AbstractType
|
|||||||
{
|
{
|
||||||
if ($options['allow_add'] && $options['prototype']) {
|
if ($options['allow_add'] && $options['prototype']) {
|
||||||
$prototype = $builder->create($options['prototype_name'], $options['type'], array_replace(array(
|
$prototype = $builder->create($options['prototype_name'], $options['type'], array_replace(array(
|
||||||
'required' => $options['required'],
|
|
||||||
'label' => $options['prototype_name'].'label__',
|
'label' => $options['prototype_name'].'label__',
|
||||||
), $options['options']));
|
), $options['options']));
|
||||||
$builder->setAttribute('prototype', $prototype->getForm());
|
$builder->setAttribute('prototype', $prototype->getForm());
|
||||||
|
Reference in New Issue
Block a user