src/Form/Type/CustomTextType.php line 9

Open in your IDE?
  1. <?php
  2. namespace App\Form\Type;
  3. use Symfony\Component\Form\AbstractType;
  4. use Symfony\Component\Form\Extension\Core\Type\TextType;
  5. use Symfony\Component\OptionsResolver\OptionsResolver;
  6. class CustomTextType extends AbstractType
  7. {
  8.     public function configureOptions(OptionsResolver $resolver): void
  9.     {
  10.         $resolver->setDefaults([
  11.             'empty_data' => '',
  12.             'attr' => [
  13.                 'class' => 'form-control'
  14.             ]
  15.         ]);
  16.     }
  17.     public function getParent(): string
  18.     {
  19.         return TextType::class;
  20.     }
  21. }