vendor/se7enxweb/admin-ui/src/lib/Form/Type/Search/GlobalSearchType.php line 17

Open in your IDE?
  1. <?php
  2. /**
  3. * @copyright Copyright (C) Ibexa AS. All rights reserved.
  4. * @license For full copyright and license information view LICENSE file distributed with this source code.
  5. */
  6. declare(strict_types=1);
  7. namespace Ibexa\AdminUi\Form\Type\Search;
  8. use Ibexa\Bundle\Search\Form\Data\SearchData;
  9. use Symfony\Component\Form\AbstractType;
  10. use Symfony\Component\Form\Extension\Core\Type\TextType;
  11. use Symfony\Component\Form\FormBuilderInterface;
  12. use Symfony\Component\OptionsResolver\OptionsResolver;
  13. final class GlobalSearchType extends AbstractType
  14. {
  15. public function buildForm(FormBuilderInterface $builder, array $options): void
  16. {
  17. $builder->add('query', TextType::class, [
  18. 'required' => false,
  19. ]);
  20. }
  21. public function configureOptions(OptionsResolver $resolver): void
  22. {
  23. $resolver->setDefaults([
  24. 'data_class' => SearchData::class,
  25. ]);
  26. }
  27. }