]>
Commit | Line | Data |
---|---|---|
abc32945 NL |
1 | <?php |
2 | ||
ee32248f | 3 | namespace Wallabag\ApiBundle\Form\Type; |
abc32945 NL |
4 | |
5 | use Symfony\Component\Form\AbstractType; | |
6 | use Symfony\Component\Form\CallbackTransformer; | |
7 | use Symfony\Component\Form\Extension\Core\Type\SubmitType; | |
8 | use Symfony\Component\Form\Extension\Core\Type\UrlType; | |
9c545fe0 | 9 | use Symfony\Component\Form\Extension\Core\Type\TextType; |
abc32945 NL |
10 | use Symfony\Component\Form\FormBuilderInterface; |
11 | use Symfony\Component\OptionsResolver\OptionsResolver; | |
12 | ||
13 | class ClientType extends AbstractType | |
14 | { | |
15 | public function buildForm(FormBuilderInterface $builder, array $options) | |
16 | { | |
17 | $builder | |
0f8268c9 TC |
18 | ->add('name', TextType::class, ['label' => 'apps.old_client.form.name_label']) |
19 | ->add('save', SubmitType::class, ['label' => 'apps.old_client.form.save_label']) | |
abc32945 NL |
20 | ; |
21 | } | |
22 | ||
23 | public function configureOptions(OptionsResolver $resolver) | |
24 | { | |
4094ea47 | 25 | $resolver->setDefaults([ |
abc32945 | 26 | 'data_class' => 'Wallabag\ApiBundle\Entity\Client', |
4094ea47 | 27 | ]); |
abc32945 NL |
28 | } |
29 | ||
30 | public function getBlockPrefix() | |
31 | { | |
32 | return 'client'; | |
33 | } | |
34 | } |