]> git.immae.eu Git - github/wallabag/wallabag.git/blame - src/Wallabag/ApiBundle/Form/Type/ClientType.php
Add client_credentials as grant_type
[github/wallabag/wallabag.git] / src / Wallabag / ApiBundle / Form / Type / ClientType.php
CommitLineData
abc32945
NL
1<?php
2
ee32248f 3namespace Wallabag\ApiBundle\Form\Type;
abc32945
NL
4
5use Symfony\Component\Form\AbstractType;
6use Symfony\Component\Form\CallbackTransformer;
7use Symfony\Component\Form\Extension\Core\Type\SubmitType;
8use Symfony\Component\Form\Extension\Core\Type\UrlType;
9c545fe0 9use Symfony\Component\Form\Extension\Core\Type\TextType;
abc32945
NL
10use Symfony\Component\Form\FormBuilderInterface;
11use Symfony\Component\OptionsResolver\OptionsResolver;
12
13class 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}