]> git.immae.eu Git - github/wallabag/wallabag.git/blob - src/Wallabag/ApiBundle/Form/Type/ClientType.php
Add client_credentials as grant_type
[github/wallabag/wallabag.git] / src / Wallabag / ApiBundle / Form / Type / ClientType.php
1 <?php
2
3 namespace Wallabag\ApiBundle\Form\Type;
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;
9 use Symfony\Component\Form\Extension\Core\Type\TextType;
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
18 ->add('name', TextType::class, ['label' => 'apps.old_client.form.name_label'])
19 ->add('save', SubmitType::class, ['label' => 'apps.old_client.form.save_label'])
20 ;
21 }
22
23 public function configureOptions(OptionsResolver $resolver)
24 {
25 $resolver->setDefaults([
26 'data_class' => 'Wallabag\ApiBundle\Entity\Client',
27 ]);
28 }
29
30 public function getBlockPrefix()
31 {
32 return 'client';
33 }
34 }