aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Form/Type/NewTagType.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-08-19 11:46:21 +0200
committerJeremy Benoist <jeremy.benoist@gmail.com>2015-08-22 12:40:48 +0200
commit7244d6cb61912b80341595c56cc22d9bb56e6251 (patch)
treefdb958dd7a798ec52c013edd75df9e4233c08934 /src/Wallabag/CoreBundle/Form/Type/NewTagType.php
parent109d67dbb16478f927c3d6a46ab61ea9994aafae (diff)
downloadwallabag-7244d6cb61912b80341595c56cc22d9bb56e6251.tar.gz
wallabag-7244d6cb61912b80341595c56cc22d9bb56e6251.tar.zst
wallabag-7244d6cb61912b80341595c56cc22d9bb56e6251.zip
assign tags to an entry
Diffstat (limited to 'src/Wallabag/CoreBundle/Form/Type/NewTagType.php')
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/NewTagType.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Form/Type/NewTagType.php b/src/Wallabag/CoreBundle/Form/Type/NewTagType.php
new file mode 100644
index 00000000..8e4ab649
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Form/Type/NewTagType.php
@@ -0,0 +1,30 @@
1<?php
2
3namespace Wallabag\CoreBundle\Form\Type;
4
5use Symfony\Component\Form\AbstractType;
6use Symfony\Component\Form\FormBuilderInterface;
7use Symfony\Component\OptionsResolver\OptionsResolver;
8
9class NewTagType extends AbstractType
10{
11 public function buildForm(FormBuilderInterface $builder, array $options)
12 {
13 $builder
14 ->add('label', 'text', array('required' => true))
15 ->add('save', 'submit')
16 ;
17 }
18
19 public function configureOptions(OptionsResolver $resolver)
20 {
21 $resolver->setDefaults(array(
22 'data_class' => 'Wallabag\CoreBundle\Entity\Tag',
23 ));
24 }
25
26 public function getName()
27 {
28 return 'tag';
29 }
30}