Selaa lähdekoodia

[TwigBundle] fixed instanceof check to include all FieldGroup like classes

Jordi Boggiano 14 vuotta sitten
vanhempi
commit
d94c581f42
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      src/Symfony/Bundle/TwigBundle/Extension/FormExtension.php

+ 1 - 1
src/Symfony/Bundle/TwigBundle/Extension/FormExtension.php

@@ -96,7 +96,7 @@ class FormExtension extends \Twig_Extension
             $this->templates = $this->resolveResources($this->resources);
         }
 
-        if ($field instanceof Form || get_class($field) === 'Symfony\Component\Form\FieldGroup') {
+        if ($field instanceof FieldGroupInterface) {
             return $this->templates['group']->getBlock('group', array(
                 'group'      => $field,
                 'attributes' => $attributes,