vendor/symfony/ux-dropzone/src/Form/DropzoneType.php line 23

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the Symfony package.
  4.  *
  5.  * (c) Fabien Potencier <fabien@symfony.com>
  6.  *
  7.  * For the full copyright and license information, please view the LICENSE
  8.  * file that was distributed with this source code.
  9.  */
  10. namespace Symfony\UX\Dropzone\Form;
  11. use Symfony\Component\Form\AbstractType;
  12. use Symfony\Component\Form\Extension\Core\Type\FileType;
  13. use Symfony\Component\OptionsResolver\OptionsResolver;
  14. /**
  15.  * @author Titouan Galopin <galopintitouan@gmail.com>
  16.  *
  17.  * @final
  18.  */
  19. class DropzoneType extends AbstractType
  20. {
  21.     public function configureOptions(OptionsResolver $resolver)
  22.     {
  23.         $resolver->setDefaults([
  24.             'attr' => [
  25.                 'placeholder' => 'Drag and drop or browse',
  26.             ],
  27.         ]);
  28.     }
  29.     public function getParent()
  30.     {
  31.         return FileType::class;
  32.     }
  33.     public function getBlockPrefix()
  34.     {
  35.         return 'dropzone';
  36.     }
  37. }