|
@@ -28,7 +28,6 @@ class CollectionType extends AbstractType
|
|
if ($options['allow_add'] && $options['prototype']) {
|
|
if ($options['allow_add'] && $options['prototype']) {
|
|
$prototype = $builder->create('$$name$$', $options['type'], $options['options']);
|
|
$prototype = $builder->create('$$name$$', $options['type'], $options['options']);
|
|
$builder->setAttribute('prototype', $prototype->getForm());
|
|
$builder->setAttribute('prototype', $prototype->getForm());
|
|
- $builder->add($prototype);
|
|
|
|
}
|
|
}
|
|
|
|
|
|
$dataClass = isset($options['options']['data_class']) ? $options['options']['data_class'] : null;
|
|
$dataClass = isset($options['options']['data_class']) ? $options['options']['data_class'] : null;
|
|
@@ -68,6 +67,16 @@ class CollectionType extends AbstractType
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /**
|
|
|
|
+ * {@inheritdoc}
|
|
|
|
+ */
|
|
|
|
+ public function buildViewBottomUp(FormView $view, FormInterface $form)
|
|
|
|
+ {
|
|
|
|
+ if ($form->hasAttribute('prototype') && $view->get('prototype')->get('multipart')) {
|
|
|
|
+ $view->set('multipart', true);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* {@inheritdoc}
|
|
* {@inheritdoc}
|
|
*/
|
|
*/
|