src/App/Form/Forms/Searching/LegacyProxySearchForm.php line 12

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