diff options
author | Nicolas LÅ“uillet <nicolas@loeuillet.org> | 2016-10-08 13:31:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-10-08 13:31:54 +0200 |
commit | 93a95c09bf7ab389de623f6cda01dfc295aa6b74 (patch) | |
tree | dfd6ab58fb234b2cc795eca7f3f5951cd4e2aea2 /src/Wallabag/CoreBundle/Form | |
parent | 4ad6f5878a7e7ab6359151b049fb49b9dd2c78ec (diff) | |
parent | ee32248f43baef7e995c9e420cd00a137e626cf0 (diff) | |
download | wallabag-93a95c09bf7ab389de623f6cda01dfc295aa6b74.tar.gz wallabag-93a95c09bf7ab389de623f6cda01dfc295aa6b74.tar.zst wallabag-93a95c09bf7ab389de623f6cda01dfc295aa6b74.zip |
Merge pull request #2351 from wallabag/fix-api-client-deletion
Changed relation between API client and refresh token
Diffstat (limited to 'src/Wallabag/CoreBundle/Form')
-rw-r--r-- | src/Wallabag/CoreBundle/Form/Type/ClientType.php | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/src/Wallabag/CoreBundle/Form/Type/ClientType.php b/src/Wallabag/CoreBundle/Form/Type/ClientType.php deleted file mode 100644 index d1fa94e6..00000000 --- a/src/Wallabag/CoreBundle/Form/Type/ClientType.php +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\CoreBundle\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' => 'developer.client.form.name_label']) | ||
19 | ->add('redirect_uris', UrlType::class, ['required' => false, 'label' => 'developer.client.form.redirect_uris_label']) | ||
20 | ->add('save', SubmitType::class, ['label' => 'developer.client.form.save_label']) | ||
21 | ; | ||
22 | |||
23 | $builder->get('redirect_uris') | ||
24 | ->addModelTransformer(new CallbackTransformer( | ||
25 | function ($originalUri) { | ||
26 | return $originalUri; | ||
27 | }, | ||
28 | function ($submittedUri) { | ||
29 | return [$submittedUri]; | ||
30 | } | ||
31 | )) | ||
32 | ; | ||
33 | } | ||
34 | |||
35 | public function configureOptions(OptionsResolver $resolver) | ||
36 | { | ||
37 | $resolver->setDefaults([ | ||
38 | 'data_class' => 'Wallabag\ApiBundle\Entity\Client', | ||
39 | ]); | ||
40 | } | ||
41 | |||
42 | public function getBlockPrefix() | ||
43 | { | ||
44 | return 'client'; | ||
45 | } | ||
46 | } | ||