Explorar o código

[Form] add type for FileField class

Oleg Zinchenko %!s(int64=14) %!d(string=hai) anos
pai
achega
6f28511ee4
Modificáronse 1 ficheiros con 10 adicións e 0 borrados
  1. 10 0
      src/Symfony/Component/Form/FileField.php

+ 10 - 0
src/Symfony/Component/Form/FileField.php

@@ -16,6 +16,16 @@ namespace Symfony\Component\Form;
  */
 class FileField extends InputField
 {
+    /**
+     * {@inheritDoc}
+     */
+    public function __construct($key, array $options = array())
+    {
+        $options['type'] = 'file';
+
+        parent::__construct($key, $options);
+    }
+
     /**
      * {@inheritDoc}
      */