Procházet zdrojové kódy

[Form] add type for FileField class

Oleg Zinchenko před 14 roky
rodič
revize
6f28511ee4
1 změnil soubory, kde provedl 10 přidání a 0 odebrání
  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}
      */