src/Form/Frontend/PhoneBookSearchType.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Form\Frontend;
  3. use Symfony\Component\Form\AbstractType;
  4. use Symfony\Component\Form\Extension\Core\Type\TextType;
  5. use Symfony\Component\Form\FormBuilderInterface;
  6. use Symfony\Component\OptionsResolver\OptionsResolver;
  7. class PhoneBookSearchType extends AbstractType
  8. {
  9.     public function buildForm(FormBuilderInterface $builder, array $options): void
  10.     {
  11.         $builder
  12.             ->add('search'TextType::class, [
  13.                 'required' => false,
  14.                 'label' => false,
  15.                 'attr' => [
  16.                     'placeholder' => 'Rechercher dans l\'annuaire'
  17.                 ]
  18.             ])
  19.         ;
  20.     }
  21.     public function configureOptions(OptionsResolver $resolver): void
  22.     {
  23.         $resolver->setDefaults([
  24.             // Configure your form options here
  25.         ]);
  26.     }
  27. }