]> git.immae.eu Git - github/wallabag/wallabag.git/blame - src/Wallabag/CoreBundle/Form/Type/RssType.php
Fix display the form errors correctly
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Form / Type / RssType.php
CommitLineData
0c83fd59 1<?php
4346a860 2
0c83fd59
J
3namespace Wallabag\CoreBundle\Form\Type;
4
5use Symfony\Component\Form\AbstractType;
619cc453 6use Symfony\Component\Form\Extension\Core\Type\SubmitType;
0c83fd59 7use Symfony\Component\Form\FormBuilderInterface;
75e9d1df 8use Symfony\Component\OptionsResolver\OptionsResolver;
0c83fd59
J
9
10class RssType extends AbstractType
11{
12 public function buildForm(FormBuilderInterface $builder, array $options)
13 {
14 $builder
4094ea47 15 ->add('rss_limit', null, [
0d42217e 16 'label' => 'config.form_rss.rss_limit',
ab9eb5cd 17 'property_path' => 'rssLimit',
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
J
33 {
34 return 'rss_config';
35 }
36}