Changeset View
Changeset View
Standalone View
Standalone View
src/Form/SearchBarType.php
- This file was added.
1 | <?php | ||||
---|---|---|---|---|---|
2 | | ||||
3 | namespace App\Form; | ||||
4 | | ||||
5 | use Symfony\Component\Form\AbstractType; | ||||
6 | use Symfony\Component\Form\FormBuilderInterface; | ||||
7 | use Symfony\Component\Form\Extension\Core\Type\SubmitType; | ||||
8 | use Symfony\Component\Form\Extension\Core\Type\SearchType; | ||||
9 | | ||||
10 | /** | ||||
11 | * Class SearchBarType | ||||
12 | * Used in the navbar to create the form | ||||
13 | * @package App\Form | ||||
14 | */ | ||||
15 | class SearchBarType extends AbstractType | ||||
16 | { | ||||
17 | public function buildForm(FormBuilderInterface $builder, array $options) | ||||
18 | { | ||||
19 | $builder ->add('search_term', SearchType::class, [ | ||||
20 | 'translation_domain' => 'app', | ||||
21 | ]); | ||||
22 | } | ||||
23 | } | ||||
24 | |