FileField.php 673 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php
  2. namespace Symfony\Component\Form;
  3. /*
  4. * This file is part of the Symfony framework.
  5. *
  6. * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
  7. *
  8. * This source file is subject to the MIT license that is bundled
  9. * with this source code in the file LICENSE.
  10. */
  11. /**
  12. * A file field to upload files.
  13. */
  14. class FileField extends InputField
  15. {
  16. /**
  17. * {@inheritDoc}
  18. */
  19. public function render(array $attributes = array())
  20. {
  21. return parent::render(array_merge(array(
  22. 'type' => 'file',
  23. ), $attributes));
  24. }
  25. /**
  26. * {@inheritDoc}
  27. */
  28. public function isMultipart()
  29. {
  30. return true;
  31. }
  32. }