diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-08-07 22:20:30 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2015-08-12 09:01:29 +0200 |
commit | 2686457448372543fdf4f1fc54c4fd20f0f02c2c (patch) | |
tree | 485eeecc3bd3db3613d47de25662d5c9163e4afe /src/Wallabag/CoreBundle/Filter/EntryFilterType.php | |
parent | fedaf005377e6d62ff0986f7f54afef3287a6451 (diff) | |
download | wallabag-2686457448372543fdf4f1fc54c4fd20f0f02c2c.tar.gz wallabag-2686457448372543fdf4f1fc54c4fd20f0f02c2c.tar.zst wallabag-2686457448372543fdf4f1fc54c4fd20f0f02c2c.zip |
store estimated reading time / filters on reading time
Diffstat (limited to 'src/Wallabag/CoreBundle/Filter/EntryFilterType.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Filter/EntryFilterType.php | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Filter/EntryFilterType.php b/src/Wallabag/CoreBundle/Filter/EntryFilterType.php new file mode 100644 index 00000000..636ba324 --- /dev/null +++ b/src/Wallabag/CoreBundle/Filter/EntryFilterType.php | |||
@@ -0,0 +1,28 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\CoreBundle\Filter; | ||
4 | |||
5 | use Symfony\Component\Form\AbstractType; | ||
6 | use Symfony\Component\Form\FormBuilderInterface; | ||
7 | use Symfony\Component\OptionsResolver\OptionsResolver; | ||
8 | |||
9 | class EntryFilterType extends AbstractType | ||
10 | { | ||
11 | public function buildForm(FormBuilderInterface $builder, array $options) | ||
12 | { | ||
13 | $builder->add('readingTime', 'filter_number_range'); | ||
14 | } | ||
15 | |||
16 | public function getName() | ||
17 | { | ||
18 | return 'entry_filter'; | ||
19 | } | ||
20 | |||
21 | public function configureOptions(OptionsResolver $resolver) | ||
22 | { | ||
23 | $resolver->setDefaults(array( | ||
24 | 'csrf_protection' => false, | ||
25 | 'validation_groups' => array('filtering') | ||
26 | )); | ||
27 | } | ||
28 | } | ||