aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Form/Type/FeedType.php
diff options
context:
space:
mode:
authorlizyn <zhiylin@outlook.com>2020-02-24 10:04:13 +0800
committerGitHub <noreply@github.com>2020-02-24 10:04:13 +0800
commitb19df31d78d881a43bcf6b3215e5fc3781e8e8aa (patch)
treed0d9861694a4b5e5fbfdbeb53c255ecd15fe9328 /src/Wallabag/CoreBundle/Form/Type/FeedType.php
parent4d0c632c70ea50d459c3c55ddda2e0f394dd51cb (diff)
parent04d918cae0227c06a41d27fb6533dddbf30dfe71 (diff)
downloadwallabag-b19df31d78d881a43bcf6b3215e5fc3781e8e8aa.tar.gz
wallabag-b19df31d78d881a43bcf6b3215e5fc3781e8e8aa.tar.zst
wallabag-b19df31d78d881a43bcf6b3215e5fc3781e8e8aa.zip
Merge pull request #1 from wallabag/master
Keep up with the master again
Diffstat (limited to 'src/Wallabag/CoreBundle/Form/Type/FeedType.php')
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/FeedType.php36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Form/Type/FeedType.php b/src/Wallabag/CoreBundle/Form/Type/FeedType.php
new file mode 100644
index 00000000..9b34daf4
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Form/Type/FeedType.php
@@ -0,0 +1,36 @@
1<?php
2
3namespace Wallabag\CoreBundle\Form\Type;
4
5use Symfony\Component\Form\AbstractType;
6use Symfony\Component\Form\Extension\Core\Type\SubmitType;
7use Symfony\Component\Form\FormBuilderInterface;
8use Symfony\Component\OptionsResolver\OptionsResolver;
9
10class FeedType extends AbstractType
11{
12 public function buildForm(FormBuilderInterface $builder, array $options)
13 {
14 $builder
15 ->add('feed_limit', null, [
16 'label' => 'config.form_feed.feed_limit',
17 'property_path' => 'feedLimit',
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 'feed_config';
35 }
36}