diff options
author | Kevin Decherf <kevin@kdecherf.com> | 2019-06-23 22:13:44 +0200 |
---|---|---|
committer | Kevin Decherf <kevin@kdecherf.com> | 2020-04-25 15:59:23 +0200 |
commit | 24230a5130005e274e1d8d3fe8eaca13cb978b9c (patch) | |
tree | dd91e56d1f8ea2ad0302440206688d13f66d1bfc /src/Wallabag/CoreBundle/Form/Type | |
parent | c675bd11c66e60a1976dfd66484448dcc9d80f0f (diff) | |
download | wallabag-24230a5130005e274e1d8d3fe8eaca13cb978b9c.tar.gz wallabag-24230a5130005e274e1d8d3fe8eaca13cb978b9c.tar.zst wallabag-24230a5130005e274e1d8d3fe8eaca13cb978b9c.zip |
Add new Ignore Origin rules tab, update ConfigController
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
Diffstat (limited to 'src/Wallabag/CoreBundle/Form/Type')
-rw-r--r-- | src/Wallabag/CoreBundle/Form/Type/IgnoreOriginUserRuleType.php | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Form/Type/IgnoreOriginUserRuleType.php b/src/Wallabag/CoreBundle/Form/Type/IgnoreOriginUserRuleType.php new file mode 100644 index 00000000..b9110f17 --- /dev/null +++ b/src/Wallabag/CoreBundle/Form/Type/IgnoreOriginUserRuleType.php | |||
@@ -0,0 +1,37 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\CoreBundle\Form\Type; | ||
4 | |||
5 | use Symfony\Component\Form\AbstractType; | ||
6 | use Symfony\Component\Form\Extension\Core\Type\SubmitType; | ||
7 | use Symfony\Component\Form\Extension\Core\Type\TextType; | ||
8 | use Symfony\Component\Form\FormBuilderInterface; | ||
9 | use Symfony\Component\OptionsResolver\OptionsResolver; | ||
10 | |||
11 | class IgnoreOriginUserRuleType extends AbstractType | ||
12 | { | ||
13 | public function buildForm(FormBuilderInterface $builder, array $options) | ||
14 | { | ||
15 | $builder | ||
16 | ->add('rule', TextType::class, [ | ||
17 | 'required' => true, | ||
18 | 'label' => 'config.form_rules.rule_label', | ||
19 | ]) | ||
20 | ->add('save', SubmitType::class, [ | ||
21 | 'label' => 'config.form.save', | ||
22 | ]) | ||
23 | ; | ||
24 | } | ||
25 | |||
26 | public function configureOptions(OptionsResolver $resolver) | ||
27 | { | ||
28 | $resolver->setDefaults([ | ||
29 | 'data_class' => 'Wallabag\CoreBundle\Entity\IgnoreOriginUserRule', | ||
30 | ]); | ||
31 | } | ||
32 | |||
33 | public function getBlockPrefix() | ||
34 | { | ||
35 | return 'ignore_origin_user_rule'; | ||
36 | } | ||
37 | } | ||