]> git.immae.eu Git - github/wallabag/wallabag.git/blob - src/Wallabag/CoreBundle/Form/Type/NewTagType.php
Convert array + phpDoc
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Form / Type / NewTagType.php
1 <?php
2
3 namespace Wallabag\CoreBundle\Form\Type;
4
5 use Symfony\Component\Form\AbstractType;
6 use Symfony\Component\Form\Extension\Core\Type\TextType;
7 use Symfony\Component\Form\FormBuilderInterface;
8 use Symfony\Component\OptionsResolver\OptionsResolver;
9
10 class NewTagType extends AbstractType
11 {
12 public function buildForm(FormBuilderInterface $builder, array $options)
13 {
14 $builder
15 ->add('label', TextType::class, ['required' => true])
16 ;
17 }
18
19 public function configureOptions(OptionsResolver $resolver)
20 {
21 $resolver->setDefaults([
22 'data_class' => 'Wallabag\CoreBundle\Entity\Tag',
23 ]);
24 }
25
26 public function getBlockPrefix()
27 {
28 return 'tag';
29 }
30 }