src/Products/NotificationsBundle/Form/Forms/Lists/ListSearchForm.php line 11

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