Selaa lähdekoodia

[Form] added a FileField

Fabien Potencier 14 vuotta sitten
vanhempi
commit
40c0fe854f
1 muutettua tiedostoa jossa 27 lisäystä ja 0 poistoa
  1. 27 0
      src/Symfony/Component/Form/FileField.php

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

@@ -0,0 +1,27 @@
+<?php
+
+namespace Symfony\Component\Form;
+
+/*
+ * This file is part of the symfony package.
+ * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
+ *
+ * For the full copyright and license information, please view the LICENSE
+ * file that was distributed with this source code.
+ */
+
+/**
+ * A file field to upload files.
+ */
+class FileField extends InputField
+{
+    /**
+     * {@inheritDoc}
+     */
+    public function render(array $attributes = array())
+    {
+        return parent::render(array_merge(array(
+            'type' => 'file',
+        ), $attributes));
+    }
+}