diff options
author | Kevin Decherf <kevin@kdecherf.com> | 2019-08-27 00:03:30 +0200 |
---|---|---|
committer | Kevin Decherf <kevin@kdecherf.com> | 2020-04-25 15:59:23 +0200 |
commit | 7408a6cb687959eac6bc7a2ed370695bbf88b6d6 (patch) | |
tree | d9a6c4c552f085d75df2e6d37cd5cf7979149061 /src/Wallabag/CoreBundle/Form/Type/IgnoreOriginInstanceRuleType.php | |
parent | b22eb276232b5c15a6fbadc9dd10144e709faec3 (diff) | |
download | wallabag-7408a6cb687959eac6bc7a2ed370695bbf88b6d6.tar.gz wallabag-7408a6cb687959eac6bc7a2ed370695bbf88b6d6.tar.zst wallabag-7408a6cb687959eac6bc7a2ed370695bbf88b6d6.zip |
Add controller, views and translations for ignore origin instance rules
Signed-off-by: Kevin Decherf <kevin@kdecherf.com>
Diffstat (limited to 'src/Wallabag/CoreBundle/Form/Type/IgnoreOriginInstanceRuleType.php')
-rw-r--r-- | src/Wallabag/CoreBundle/Form/Type/IgnoreOriginInstanceRuleType.php | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Form/Type/IgnoreOriginInstanceRuleType.php b/src/Wallabag/CoreBundle/Form/Type/IgnoreOriginInstanceRuleType.php new file mode 100644 index 00000000..d2e414fb --- /dev/null +++ b/src/Wallabag/CoreBundle/Form/Type/IgnoreOriginInstanceRuleType.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 IgnoreOriginInstanceRuleType 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\IgnoreOriginInstanceRule', | ||
30 | ]); | ||
31 | } | ||
32 | |||
33 | public function getBlockPrefix() | ||
34 | { | ||
35 | return 'ignore_origin_instance_rule'; | ||
36 | } | ||
37 | } | ||