Prechádzať zdrojové kódy

Merge pull request #875 from biozshock/fix-form-types-have-no-name-20

Added getName() for form types where they were missing
Thomas 13 rokov pred
rodič
commit
286f496a5f

+ 8 - 0
Form/Type/BooleanType.php

@@ -44,4 +44,12 @@ class BooleanType extends FormChoiceType
 
         return $options;
     }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function getName()
+    {
+        return 'sonata_type_boolean';
+    }
 }

+ 8 - 0
Form/Type/EqualType.php

@@ -44,4 +44,12 @@ class EqualType extends FormChoiceType
 
         return $options;
     }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function getName()
+    {
+        return 'sonata_type_equal';
+    }
 }

+ 8 - 0
Form/Type/TranslatableChoiceType.php

@@ -67,4 +67,12 @@ class TranslatableChoiceType extends ChoiceType
 
         parent::buildForm($builder, $options);
     }
+
+    /**
+     * {@inheritDoc}
+     */
+    public function getName()
+    {
+        return 'sonata_type_translatable_choice';
+    }
 }