src/Products/NotificationsBundle/Form/Forms/Profiles/ProfileSearchForm.php line 11

Open in your IDE?
  1. <?php
  2. namespace Products\NotificationsBundle\Form\Forms\Profiles;
  3. use App\Form\Forms\SearchForm;
  4. use Products\NotificationsBundle\Model\Searching\ProfileSearch;
  5. use Symfony\Component\Form\Extension\Core\Type\SearchType;
  6. use Symfony\Component\Form\FormBuilderInterface;
  7. use Symfony\Component\OptionsResolver\OptionsResolver;
  8. class ProfileSearchForm extends SearchForm
  9. {
  10.     protected const DATA_CLASS ProfileSearch::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 profiles...',
  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.contacts.filters.%s');
  33.     }
  34. }