diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-11-04 23:24:43 +0100 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-11-19 19:17:30 +0100 |
commit | ee122a7528f55dfb5f02e351c509d00b756fedaa (patch) | |
tree | b4b134dc00dda3394a1ab01408369803c8b0b889 /src/Wallabag/CoreBundle/Form | |
parent | 27dce581caba158a8ffffa5bc30648a21f47da12 (diff) | |
download | wallabag-ee122a7528f55dfb5f02e351c509d00b756fedaa.tar.gz wallabag-ee122a7528f55dfb5f02e351c509d00b756fedaa.tar.zst wallabag-ee122a7528f55dfb5f02e351c509d00b756fedaa.zip |
Added a simple search engine
Fix #18
Diffstat (limited to 'src/Wallabag/CoreBundle/Form')
-rw-r--r-- | src/Wallabag/CoreBundle/Form/Type/SearchEntryType.php | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Form/Type/SearchEntryType.php b/src/Wallabag/CoreBundle/Form/Type/SearchEntryType.php new file mode 100644 index 00000000..b56cae8e --- /dev/null +++ b/src/Wallabag/CoreBundle/Form/Type/SearchEntryType.php | |||
@@ -0,0 +1,29 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\CoreBundle\Form\Type; | ||
4 | |||
5 | use Symfony\Component\Form\AbstractType; | ||
6 | use Symfony\Component\Form\Extension\Core\Type\TextType; | ||
7 | use Symfony\Component\Form\FormBuilderInterface; | ||
8 | use Symfony\Component\OptionsResolver\OptionsResolver; | ||
9 | |||
10 | class SearchEntryType extends AbstractType | ||
11 | { | ||
12 | public function buildForm(FormBuilderInterface $builder, array $options) | ||
13 | { | ||
14 | $builder | ||
15 | ->setMethod('GET') | ||
16 | ->add('term', TextType::class, [ | ||
17 | 'required' => true, | ||
18 | 'label' => 'entry.new.form_search.term_label', | ||
19 | ]) | ||
20 | ; | ||
21 | } | ||
22 | |||
23 | public function configureOptions(OptionsResolver $resolver) | ||
24 | { | ||
25 | $resolver->setDefaults([ | ||
26 | 'csrf_protection' => false, | ||
27 | ]); | ||
28 | } | ||
29 | } | ||