]>
Commit | Line | Data |
---|---|---|
a664a1d8 SH |
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 RenameTagType extends AbstractType | |
11 | { | |
12 | public function buildForm(FormBuilderInterface $builder, array $options) | |
13 | { | |
14 | $builder | |
15 | ->add('label', TextType::class, [ | |
16 | 'required' => true, | |
17 | 'attr' => [ | |
18 | 'placeholder' => 'tag.rename.placeholder', | |
19 | ], | |
20 | ]) | |
21 | ; | |
22 | } | |
23 | ||
24 | public function configureOptions(OptionsResolver $resolver) | |
25 | { | |
26 | $resolver->setDefaults([ | |
27 | 'data_class' => 'Wallabag\CoreBundle\Entity\Tag', | |
28 | ]); | |
29 | } | |
30 | ||
31 | public function getBlockPrefix() | |
32 | { | |
33 | return 'tag'; | |
34 | } | |
35 | } |