aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Form
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2016-11-04 23:24:43 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2016-11-19 19:17:30 +0100
commitee122a7528f55dfb5f02e351c509d00b756fedaa (patch)
treeb4b134dc00dda3394a1ab01408369803c8b0b889 /src/Wallabag/CoreBundle/Form
parent27dce581caba158a8ffffa5bc30648a21f47da12 (diff)
downloadwallabag-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.php29
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
3namespace Wallabag\CoreBundle\Form\Type;
4
5use Symfony\Component\Form\AbstractType;
6use Symfony\Component\Form\Extension\Core\Type\TextType;
7use Symfony\Component\Form\FormBuilderInterface;
8use Symfony\Component\OptionsResolver\OptionsResolver;
9
10class 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}