|
@@ -5,6 +5,7 @@ namespace Symfony\Bundle\TwigBundle\Extension;
|
|
|
use Symfony\Component\Form\Form;
|
|
|
use Symfony\Component\Form\FieldGroupInterface;
|
|
|
use Symfony\Component\Form\FieldInterface;
|
|
|
+use Symfony\Component\Form\CollectionField;
|
|
|
use Symfony\Bundle\TwigBundle\TokenParser\FormThemeTokenParser;
|
|
|
use Symfony\Bundle\FrameworkBundle\Templating\HtmlGeneratorInterface;
|
|
|
|
|
@@ -100,6 +101,13 @@ class FormExtension extends \Twig_Extension
|
|
|
));
|
|
|
}
|
|
|
|
|
|
+ if ($field instanceof CollectionField) {
|
|
|
+ return $this->templates['group']->getBlock('collection', array(
|
|
|
+ 'collection' => $field,
|
|
|
+ 'attributes' => $attributes,
|
|
|
+ ));
|
|
|
+ }
|
|
|
+
|
|
|
return $this->templates['field']->getBlock('field', array(
|
|
|
'field' => $field,
|
|
|
'attributes' => $attributes,
|