aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Form
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-04-01 21:08:56 +0200
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-04-01 21:08:56 +0200
commit1a93ee423b072ec3bcb0c437cbf9b488bdea245c (patch)
tree1466dcb1b465f9ead71c4dcbefe380853c5d846b /src/Wallabag/CoreBundle/Form
parentf98a2a0fc3ae8a5955bb811f083c3d2535f96791 (diff)
parent7d74a2f32b55fa9c33f5ecff57785e8d9e4de8ae (diff)
downloadwallabag-1a93ee423b072ec3bcb0c437cbf9b488bdea245c.tar.gz
wallabag-1a93ee423b072ec3bcb0c437cbf9b488bdea245c.tar.zst
wallabag-1a93ee423b072ec3bcb0c437cbf9b488bdea245c.zip
Merge pull request #1166 from wallabag/v2-rss
Add RSS feeds
Diffstat (limited to 'src/Wallabag/CoreBundle/Form')
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/ConfigType.php2
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/RssType.php29
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
2namespace Wallabag\CoreBundle\Form\Type;
3
4use Symfony\Component\Form\AbstractType;
5use Symfony\Component\Form\FormBuilderInterface;
6use Symfony\Component\OptionsResolver\OptionsResolverInterface;
7
8class 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}