Explorar o código

Merge pull request #258 from weaverryan/number_filter_type_add_options

[Form][Filter] Adding missing options, which are introduced by the Number
Thomas %!s(int64=13) %!d(string=hai) anos
pai
achega
6542ffad15
Modificáronse 1 ficheiros con 12 adicións e 0 borrados
  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;
+    }
 }