Преглед изворни кода

Merge pull request #258 from weaverryan/number_filter_type_add_options

[Form][Filter] Adding missing options, which are introduced by the Number
Thomas пре 13 година
родитељ
комит
6542ffad15
1 измењених фајлова са 12 додато и 0 уклоњено
  1. 12 0
      Form/Type/Filter/NumberType.php

+ 12 - 0
Form/Type/Filter/NumberType.php

@@ -62,4 +62,16 @@ class NumberType extends AbstractType
             ->add('value', 'number', array('required' => false))
         ;
     }
+
+    public function getDefaultOptions(array $options)
+    {
+        $defaultOptions = array(
+            'field_type'       => 'text',
+            'field_options'    => array()
+        );
+
+        $options = array_replace($options, $defaultOptions);
+
+        return $options;
+    }
 }