Explorar el Código

[Form] add type for FileField class

Oleg Zinchenko hace 14 años
padre
commit
6f28511ee4
Se han modificado 1 ficheros con 10 adiciones y 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}
      */