]>
Commit | Line | Data |
---|---|---|
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\FormBuilderInterface; | |
8 | use Symfony\Component\OptionsResolver\OptionsResolver; | |
9 | ||
10 | class RssType extends AbstractType | |
11 | { | |
12 | public function buildForm(FormBuilderInterface $builder, array $options) | |
13 | { | |
14 | $builder | |
15 | ->add('rss_limit', null, [ | |
16 | 'label' => 'config.form_rss.rss_limit', | |
17 | 'property_path' => 'rssLimit', | |
18 | ]) | |
19 | ->add('save', SubmitType::class, [ | |
20 | 'label' => 'config.form.save', | |
21 | ]) | |
22 | ; | |
23 | } | |
24 | ||
25 | public function configureOptions(OptionsResolver $resolver) | |
26 | { | |
27 | $resolver->setDefaults([ | |
28 | 'data_class' => 'Wallabag\CoreBundle\Entity\Config', | |
29 | ]); | |
30 | } | |
31 | ||
32 | public function getBlockPrefix() | |
33 | { | |
34 | return 'rss_config'; | |
35 | } | |
36 | } |