src/App/Form/Forms/Searching/AccountSearchForm.php line 11

Open in your IDE?
  1. <?php
  2. namespace App\Form\Forms\Searching;
  3. use App\Form\Forms\SearchForm;
  4. use App\Model\Searching\AccountSearch;
  5. use Symfony\Component\Form\Extension\Core\Type\SearchType;
  6. use Symfony\Component\Form\FormBuilderInterface;
  7. use Symfony\Component\OptionsResolver\OptionsResolver;
  8. final class AccountSearchForm extends SearchForm
  9. {
  10.     protected const DATA_CLASS AccountSearch::class;
  11.     /**
  12.      * {@inheritDoc}
  13.      */
  14.     public function buildForm(FormBuilderInterface $builder, array $options)
  15.     {
  16.         parent::buildForm($builder$options);
  17.         $builder->add('lookup'SearchType::class, [
  18.             'required' => false,
  19.             'attr' => [
  20.                 'placeholder' => 'Search accounts...',
  21.             ],
  22.         ]);
  23.     }
  24.     /**
  25.      * {@inheritDoc}
  26.      */
  27.     public function configureOptions(OptionsResolver $resolver)
  28.     {
  29.         parent::configureOptions($resolver);
  30.         $resolver->setDefault('search_filters_label_format''app.security.accounts.filters.%s');
  31.     }
  32. }