]>
Commit | Line | Data |
---|---|---|
0c83fd59 | 1 | <?php |
4346a860 | 2 | |
0c83fd59 J |
3 | namespace Wallabag\CoreBundle\Form\Type; |
4 | ||
5 | use Symfony\Component\Form\AbstractType; | |
619cc453 | 6 | use Symfony\Component\Form\Extension\Core\Type\SubmitType; |
0c83fd59 | 7 | use Symfony\Component\Form\FormBuilderInterface; |
75e9d1df | 8 | use Symfony\Component\OptionsResolver\OptionsResolver; |
0c83fd59 | 9 | |
531c8d0a | 10 | class FeedType extends AbstractType |
0c83fd59 J |
11 | { |
12 | public function buildForm(FormBuilderInterface $builder, array $options) | |
13 | { | |
14 | $builder | |
531c8d0a TC |
15 | ->add('feed_limit', null, [ |
16 | 'label' => 'config.form_feed.feed_limit', | |
17 | 'property_path' => 'feedLimit', | |
4094ea47 JB |
18 | ]) |
19 | ->add('save', SubmitType::class, [ | |
0d42217e | 20 | 'label' => 'config.form.save', |
4094ea47 | 21 | ]) |
0c83fd59 J |
22 | ; |
23 | } | |
24 | ||
75e9d1df | 25 | public function configureOptions(OptionsResolver $resolver) |
0c83fd59 | 26 | { |
4094ea47 | 27 | $resolver->setDefaults([ |
0c83fd59 | 28 | 'data_class' => 'Wallabag\CoreBundle\Entity\Config', |
4094ea47 | 29 | ]); |
0c83fd59 J |
30 | } |
31 | ||
619cc453 | 32 | public function getBlockPrefix() |
0c83fd59 | 33 | { |
531c8d0a | 34 | return 'feed_config'; |
0c83fd59 J |
35 | } |
36 | } |