Explorar el Código

[Form] added a FileField

Fabien Potencier hace 14 años
padre
commit
40c0fe854f
Se han modificado 1 ficheros con 27 adiciones y 0 borrados
  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));
+    }
+}