diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Form/Type')
-rw-r--r-- | src/Wallabag/CoreBundle/Form/Type/ConfigType.php | 2 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Form/Type/RssType.php | 29 |
2 files changed, 30 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php index 0c8706e2..0fcf020a 100644 --- a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php +++ b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php | |||
@@ -24,7 +24,7 @@ class ConfigType extends AbstractType | |||
24 | { | 24 | { |
25 | $builder | 25 | $builder |
26 | ->add('theme', 'choice', array('choices' => $this->themes)) | 26 | ->add('theme', 'choice', array('choices' => $this->themes)) |
27 | ->add('items_per_page', 'text') | 27 | ->add('items_per_page') |
28 | ->add('language') | 28 | ->add('language') |
29 | ->add('save', 'submit') | 29 | ->add('save', 'submit') |
30 | ; | 30 | ; |
diff --git a/src/Wallabag/CoreBundle/Form/Type/RssType.php b/src/Wallabag/CoreBundle/Form/Type/RssType.php new file mode 100644 index 00000000..a1ab990f --- /dev/null +++ b/src/Wallabag/CoreBundle/Form/Type/RssType.php | |||
@@ -0,0 +1,29 @@ | |||
1 | <?php | ||
2 | namespace Wallabag\CoreBundle\Form\Type; | ||
3 | |||
4 | use Symfony\Component\Form\AbstractType; | ||
5 | use Symfony\Component\Form\FormBuilderInterface; | ||
6 | use Symfony\Component\OptionsResolver\OptionsResolverInterface; | ||
7 | |||
8 | class RssType extends AbstractType | ||
9 | { | ||
10 | public function buildForm(FormBuilderInterface $builder, array $options) | ||
11 | { | ||
12 | $builder | ||
13 | ->add('rss_limit') | ||
14 | ->add('save', 'submit') | ||
15 | ; | ||
16 | } | ||
17 | |||
18 | public function setDefaultOptions(OptionsResolverInterface $resolver) | ||
19 | { | ||
20 | $resolver->setDefaults(array( | ||
21 | 'data_class' => 'Wallabag\CoreBundle\Entity\Config', | ||
22 | )); | ||
23 | } | ||
24 | |||
25 | public function getName() | ||
26 | { | ||
27 | return 'rss_config'; | ||
28 | } | ||
29 | } | ||