diff options
Diffstat (limited to 'src/Wallabag/CoreBundle/Form')
-rw-r--r-- | src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php | 26 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Form/Type/ClientType.php | 10 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Form/Type/ConfigType.php | 32 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Form/Type/EditEntryType.php | 20 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php | 50 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Form/Type/NewEntryType.php | 8 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Form/Type/NewTagType.php | 6 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Form/Type/NewUserType.php | 32 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Form/Type/RssType.php | 12 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Form/Type/TaggingRuleType.php | 16 | ||||
-rw-r--r-- | src/Wallabag/CoreBundle/Form/Type/UserInformationType.php | 20 |
11 files changed, 116 insertions, 116 deletions
diff --git a/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php b/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php index 841af51e..81c4a616 100644 --- a/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php +++ b/src/Wallabag/CoreBundle/Form/Type/ChangePasswordType.php | |||
@@ -15,28 +15,28 @@ class ChangePasswordType extends AbstractType | |||
15 | public function buildForm(FormBuilderInterface $builder, array $options) | 15 | public function buildForm(FormBuilderInterface $builder, array $options) |
16 | { | 16 | { |
17 | $builder | 17 | $builder |
18 | ->add('old_password', PasswordType::class, array( | 18 | ->add('old_password', PasswordType::class, [ |
19 | 'constraints' => new UserPassword(array('message' => 'validator.password_wrong_value')), | 19 | 'constraints' => new UserPassword(['message' => 'validator.password_wrong_value']), |
20 | 'label' => 'config.form_password.old_password_label', | 20 | 'label' => 'config.form_password.old_password_label', |
21 | )) | 21 | ]) |
22 | ->add('new_password', RepeatedType::class, array( | 22 | ->add('new_password', RepeatedType::class, [ |
23 | 'type' => PasswordType::class, | 23 | 'type' => PasswordType::class, |
24 | 'invalid_message' => 'validator.password_must_match', | 24 | 'invalid_message' => 'validator.password_must_match', |
25 | 'required' => true, | 25 | 'required' => true, |
26 | 'first_options' => array('label' => 'config.form_password.new_password_label'), | 26 | 'first_options' => ['label' => 'config.form_password.new_password_label'], |
27 | 'second_options' => array('label' => 'config.form_password.repeat_new_password_label'), | 27 | 'second_options' => ['label' => 'config.form_password.repeat_new_password_label'], |
28 | 'constraints' => array( | 28 | 'constraints' => [ |
29 | new Constraints\Length(array( | 29 | new Constraints\Length([ |
30 | 'min' => 8, | 30 | 'min' => 8, |
31 | 'minMessage' => 'validator.password_too_short', | 31 | 'minMessage' => 'validator.password_too_short', |
32 | )), | 32 | ]), |
33 | new Constraints\NotBlank(), | 33 | new Constraints\NotBlank(), |
34 | ), | 34 | ], |
35 | 'label' => 'config.form_password.new_password_label', | 35 | 'label' => 'config.form_password.new_password_label', |
36 | )) | 36 | ]) |
37 | ->add('save', SubmitType::class, array( | 37 | ->add('save', SubmitType::class, [ |
38 | 'label' => 'config.form.save', | 38 | 'label' => 'config.form.save', |
39 | )) | 39 | ]) |
40 | ; | 40 | ; |
41 | } | 41 | } |
42 | 42 | ||
diff --git a/src/Wallabag/CoreBundle/Form/Type/ClientType.php b/src/Wallabag/CoreBundle/Form/Type/ClientType.php index 9f620414..8b351e60 100644 --- a/src/Wallabag/CoreBundle/Form/Type/ClientType.php +++ b/src/Wallabag/CoreBundle/Form/Type/ClientType.php | |||
@@ -14,8 +14,8 @@ class ClientType extends AbstractType | |||
14 | public function buildForm(FormBuilderInterface $builder, array $options) | 14 | public function buildForm(FormBuilderInterface $builder, array $options) |
15 | { | 15 | { |
16 | $builder | 16 | $builder |
17 | ->add('redirect_uris', UrlType::class, array('required' => true, 'label' => 'developer.client.form.redirect_uris_label')) | 17 | ->add('redirect_uris', UrlType::class, ['required' => true, 'label' => 'developer.client.form.redirect_uris_label']) |
18 | ->add('save', SubmitType::class, array('label' => 'developer.client.form.save_label')) | 18 | ->add('save', SubmitType::class, ['label' => 'developer.client.form.save_label']) |
19 | ; | 19 | ; |
20 | 20 | ||
21 | $builder->get('redirect_uris') | 21 | $builder->get('redirect_uris') |
@@ -24,7 +24,7 @@ class ClientType extends AbstractType | |||
24 | return $originalUri; | 24 | return $originalUri; |
25 | }, | 25 | }, |
26 | function ($submittedUri) { | 26 | function ($submittedUri) { |
27 | return array($submittedUri); | 27 | return [$submittedUri]; |
28 | } | 28 | } |
29 | )) | 29 | )) |
30 | ; | 30 | ; |
@@ -32,9 +32,9 @@ class ClientType extends AbstractType | |||
32 | 32 | ||
33 | public function configureOptions(OptionsResolver $resolver) | 33 | public function configureOptions(OptionsResolver $resolver) |
34 | { | 34 | { |
35 | $resolver->setDefaults(array( | 35 | $resolver->setDefaults([ |
36 | 'data_class' => 'Wallabag\ApiBundle\Entity\Client', | 36 | 'data_class' => 'Wallabag\ApiBundle\Entity\Client', |
37 | )); | 37 | ]); |
38 | } | 38 | } |
39 | 39 | ||
40 | public function getBlockPrefix() | 40 | public function getBlockPrefix() |
diff --git a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php index b30b4706..4cf22200 100644 --- a/src/Wallabag/CoreBundle/Form/Type/ConfigType.php +++ b/src/Wallabag/CoreBundle/Form/Type/ConfigType.php | |||
@@ -10,8 +10,8 @@ use Symfony\Component\OptionsResolver\OptionsResolver; | |||
10 | 10 | ||
11 | class ConfigType extends AbstractType | 11 | class ConfigType extends AbstractType |
12 | { | 12 | { |
13 | private $themes = array(); | 13 | private $themes = []; |
14 | private $languages = array(); | 14 | private $languages = []; |
15 | 15 | ||
16 | /** | 16 | /** |
17 | * @param array $themes Themes come from the LiipThemeBundle (liip_theme.themes) | 17 | * @param array $themes Themes come from the LiipThemeBundle (liip_theme.themes) |
@@ -30,39 +30,39 @@ class ConfigType extends AbstractType | |||
30 | public function buildForm(FormBuilderInterface $builder, array $options) | 30 | public function buildForm(FormBuilderInterface $builder, array $options) |
31 | { | 31 | { |
32 | $builder | 32 | $builder |
33 | ->add('theme', ChoiceType::class, array( | 33 | ->add('theme', ChoiceType::class, [ |
34 | 'choices' => array_flip($this->themes), | 34 | 'choices' => array_flip($this->themes), |
35 | 'choices_as_values' => true, | 35 | 'choices_as_values' => true, |
36 | 'label' => 'config.form_settings.theme_label', | 36 | 'label' => 'config.form_settings.theme_label', |
37 | )) | 37 | ]) |
38 | ->add('items_per_page', null, array( | 38 | ->add('items_per_page', null, [ |
39 | 'label' => 'config.form_settings.items_per_page_label', | 39 | 'label' => 'config.form_settings.items_per_page_label', |
40 | )) | 40 | ]) |
41 | ->add('reading_speed', ChoiceType::class, array( | 41 | ->add('reading_speed', ChoiceType::class, [ |
42 | 'label' => 'config.form_settings.reading_speed.label', | 42 | 'label' => 'config.form_settings.reading_speed.label', |
43 | 'choices' => array( | 43 | 'choices' => [ |
44 | 'config.form_settings.reading_speed.100_word' => '0.5', | 44 | 'config.form_settings.reading_speed.100_word' => '0.5', |
45 | 'config.form_settings.reading_speed.200_word' => '1', | 45 | 'config.form_settings.reading_speed.200_word' => '1', |
46 | 'config.form_settings.reading_speed.300_word' => '1.5', | 46 | 'config.form_settings.reading_speed.300_word' => '1.5', |
47 | 'config.form_settings.reading_speed.400_word' => '2', | 47 | 'config.form_settings.reading_speed.400_word' => '2', |
48 | ), | 48 | ], |
49 | )) | 49 | ]) |
50 | ->add('language', ChoiceType::class, array( | 50 | ->add('language', ChoiceType::class, [ |
51 | 'choices' => array_flip($this->languages), | 51 | 'choices' => array_flip($this->languages), |
52 | 'choices_as_values' => true, | 52 | 'choices_as_values' => true, |
53 | 'label' => 'config.form_settings.language_label', | 53 | 'label' => 'config.form_settings.language_label', |
54 | )) | 54 | ]) |
55 | ->add('save', SubmitType::class, array( | 55 | ->add('save', SubmitType::class, [ |
56 | 'label' => 'config.form.save', | 56 | 'label' => 'config.form.save', |
57 | )) | 57 | ]) |
58 | ; | 58 | ; |
59 | } | 59 | } |
60 | 60 | ||
61 | public function configureOptions(OptionsResolver $resolver) | 61 | public function configureOptions(OptionsResolver $resolver) |
62 | { | 62 | { |
63 | $resolver->setDefaults(array( | 63 | $resolver->setDefaults([ |
64 | 'data_class' => 'Wallabag\CoreBundle\Entity\Config', | 64 | 'data_class' => 'Wallabag\CoreBundle\Entity\Config', |
65 | )); | 65 | ]); |
66 | } | 66 | } |
67 | 67 | ||
68 | public function getBlockPrefix() | 68 | public function getBlockPrefix() |
diff --git a/src/Wallabag/CoreBundle/Form/Type/EditEntryType.php b/src/Wallabag/CoreBundle/Form/Type/EditEntryType.php index 23d7b239..40e5b5b9 100644 --- a/src/Wallabag/CoreBundle/Form/Type/EditEntryType.php +++ b/src/Wallabag/CoreBundle/Form/Type/EditEntryType.php | |||
@@ -14,30 +14,30 @@ class EditEntryType extends AbstractType | |||
14 | public function buildForm(FormBuilderInterface $builder, array $options) | 14 | public function buildForm(FormBuilderInterface $builder, array $options) |
15 | { | 15 | { |
16 | $builder | 16 | $builder |
17 | ->add('title', TextType::class, array( | 17 | ->add('title', TextType::class, [ |
18 | 'required' => true, | 18 | 'required' => true, |
19 | 'label' => 'entry.edit.title_label', | 19 | 'label' => 'entry.edit.title_label', |
20 | )) | 20 | ]) |
21 | ->add('is_public', CheckboxType::class, array( | 21 | ->add('is_public', CheckboxType::class, [ |
22 | 'required' => false, | 22 | 'required' => false, |
23 | 'label' => 'entry.edit.is_public_label', | 23 | 'label' => 'entry.edit.is_public_label', |
24 | )) | 24 | ]) |
25 | ->add('url', TextType::class, array( | 25 | ->add('url', TextType::class, [ |
26 | 'disabled' => true, | 26 | 'disabled' => true, |
27 | 'required' => false, | 27 | 'required' => false, |
28 | 'label' => 'entry.edit.url_label', | 28 | 'label' => 'entry.edit.url_label', |
29 | )) | 29 | ]) |
30 | ->add('save', SubmitType::class, array( | 30 | ->add('save', SubmitType::class, [ |
31 | 'label' => 'entry.edit.save_label', | 31 | 'label' => 'entry.edit.save_label', |
32 | )) | 32 | ]) |
33 | ; | 33 | ; |
34 | } | 34 | } |
35 | 35 | ||
36 | public function configureOptions(OptionsResolver $resolver) | 36 | public function configureOptions(OptionsResolver $resolver) |
37 | { | 37 | { |
38 | $resolver->setDefaults(array( | 38 | $resolver->setDefaults([ |
39 | 'data_class' => 'Wallabag\CoreBundle\Entity\Entry', | 39 | 'data_class' => 'Wallabag\CoreBundle\Entity\Entry', |
40 | )); | 40 | ]); |
41 | } | 41 | } |
42 | 42 | ||
43 | public function getBlockPrefix() | 43 | public function getBlockPrefix() |
diff --git a/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php b/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php index ec36503b..dcdb3ab7 100644 --- a/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php +++ b/src/Wallabag/CoreBundle/Form/Type/EntryFilterType.php | |||
@@ -34,28 +34,28 @@ class EntryFilterType extends AbstractType | |||
34 | public function buildForm(FormBuilderInterface $builder, array $options) | 34 | public function buildForm(FormBuilderInterface $builder, array $options) |
35 | { | 35 | { |
36 | $builder | 36 | $builder |
37 | ->add('readingTime', NumberRangeFilterType::class, array( | 37 | ->add('readingTime', NumberRangeFilterType::class, [ |
38 | 'label' => 'entry.filters.reading_time.label', | 38 | 'label' => 'entry.filters.reading_time.label', |
39 | )) | 39 | ]) |
40 | ->add('createdAt', DateRangeFilterType::class, array( | 40 | ->add('createdAt', DateRangeFilterType::class, [ |
41 | 'left_date_options' => array( | 41 | 'left_date_options' => [ |
42 | 'attr' => array( | 42 | 'attr' => [ |
43 | 'placeholder' => 'dd/mm/yyyy', | 43 | 'placeholder' => 'dd/mm/yyyy', |
44 | ), | 44 | ], |
45 | 'format' => 'dd/MM/yyyy', | 45 | 'format' => 'dd/MM/yyyy', |
46 | 'widget' => 'single_text', | 46 | 'widget' => 'single_text', |
47 | ), | 47 | ], |
48 | 'right_date_options' => array( | 48 | 'right_date_options' => [ |
49 | 'attr' => array( | 49 | 'attr' => [ |
50 | 'placeholder' => 'dd/mm/yyyy', | 50 | 'placeholder' => 'dd/mm/yyyy', |
51 | ), | 51 | ], |
52 | 'format' => 'dd/MM/yyyy', | 52 | 'format' => 'dd/MM/yyyy', |
53 | 'widget' => 'single_text', | 53 | 'widget' => 'single_text', |
54 | ), | 54 | ], |
55 | 'label' => 'entry.filters.created_at.label', | 55 | 'label' => 'entry.filters.created_at.label', |
56 | ) | 56 | ] |
57 | ) | 57 | ) |
58 | ->add('domainName', TextFilterType::class, array( | 58 | ->add('domainName', TextFilterType::class, [ |
59 | 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) { | 59 | 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) { |
60 | $value = $values['value']; | 60 | $value = $values['value']; |
61 | if (strlen($value) <= 2 || empty($value)) { | 61 | if (strlen($value) <= 2 || empty($value)) { |
@@ -66,14 +66,14 @@ class EntryFilterType extends AbstractType | |||
66 | return $filterQuery->createCondition($expression); | 66 | return $filterQuery->createCondition($expression); |
67 | }, | 67 | }, |
68 | 'label' => 'entry.filters.domain_label', | 68 | 'label' => 'entry.filters.domain_label', |
69 | )) | 69 | ]) |
70 | ->add('isArchived', CheckboxFilterType::class, array( | 70 | ->add('isArchived', CheckboxFilterType::class, [ |
71 | 'label' => 'entry.filters.archived_label', | 71 | 'label' => 'entry.filters.archived_label', |
72 | )) | 72 | ]) |
73 | ->add('isStarred', CheckboxFilterType::class, array( | 73 | ->add('isStarred', CheckboxFilterType::class, [ |
74 | 'label' => 'entry.filters.starred_label', | 74 | 'label' => 'entry.filters.starred_label', |
75 | )) | 75 | ]) |
76 | ->add('previewPicture', CheckboxFilterType::class, array( | 76 | ->add('previewPicture', CheckboxFilterType::class, [ |
77 | 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) { | 77 | 'apply_filter' => function (QueryInterface $filterQuery, $field, $values) { |
78 | if (false === $values['value']) { | 78 | if (false === $values['value']) { |
79 | return; | 79 | return; |
@@ -84,12 +84,12 @@ class EntryFilterType extends AbstractType | |||
84 | return $filterQuery->createCondition($expression); | 84 | return $filterQuery->createCondition($expression); |
85 | }, | 85 | }, |
86 | 'label' => 'entry.filters.preview_picture_label', | 86 | 'label' => 'entry.filters.preview_picture_label', |
87 | )) | 87 | ]) |
88 | ->add('language', ChoiceFilterType::class, array( | 88 | ->add('language', ChoiceFilterType::class, [ |
89 | 'choices' => array_flip($this->repository->findDistinctLanguageByUser($this->user->getId())), | 89 | 'choices' => array_flip($this->repository->findDistinctLanguageByUser($this->user->getId())), |
90 | 'choices_as_values' => true, | 90 | 'choices_as_values' => true, |
91 | 'label' => 'entry.filters.language_label', | 91 | 'label' => 'entry.filters.language_label', |
92 | )) | 92 | ]) |
93 | ; | 93 | ; |
94 | } | 94 | } |
95 | 95 | ||
@@ -100,9 +100,9 @@ class EntryFilterType extends AbstractType | |||
100 | 100 | ||
101 | public function configureOptions(OptionsResolver $resolver) | 101 | public function configureOptions(OptionsResolver $resolver) |
102 | { | 102 | { |
103 | $resolver->setDefaults(array( | 103 | $resolver->setDefaults([ |
104 | 'csrf_protection' => false, | 104 | 'csrf_protection' => false, |
105 | 'validation_groups' => array('filtering'), | 105 | 'validation_groups' => ['filtering'], |
106 | )); | 106 | ]); |
107 | } | 107 | } |
108 | } | 108 | } |
diff --git a/src/Wallabag/CoreBundle/Form/Type/NewEntryType.php b/src/Wallabag/CoreBundle/Form/Type/NewEntryType.php index 69fab6fb..7d74fee3 100644 --- a/src/Wallabag/CoreBundle/Form/Type/NewEntryType.php +++ b/src/Wallabag/CoreBundle/Form/Type/NewEntryType.php | |||
@@ -12,18 +12,18 @@ class NewEntryType extends AbstractType | |||
12 | public function buildForm(FormBuilderInterface $builder, array $options) | 12 | public function buildForm(FormBuilderInterface $builder, array $options) |
13 | { | 13 | { |
14 | $builder | 14 | $builder |
15 | ->add('url', UrlType::class, array( | 15 | ->add('url', UrlType::class, [ |
16 | 'required' => true, | 16 | 'required' => true, |
17 | 'label' => 'entry.new.form_new.url_label', | 17 | 'label' => 'entry.new.form_new.url_label', |
18 | )) | 18 | ]) |
19 | ; | 19 | ; |
20 | } | 20 | } |
21 | 21 | ||
22 | public function configureOptions(OptionsResolver $resolver) | 22 | public function configureOptions(OptionsResolver $resolver) |
23 | { | 23 | { |
24 | $resolver->setDefaults(array( | 24 | $resolver->setDefaults([ |
25 | 'data_class' => 'Wallabag\CoreBundle\Entity\Entry', | 25 | 'data_class' => 'Wallabag\CoreBundle\Entity\Entry', |
26 | )); | 26 | ]); |
27 | } | 27 | } |
28 | 28 | ||
29 | public function getBlockPrefix() | 29 | public function getBlockPrefix() |
diff --git a/src/Wallabag/CoreBundle/Form/Type/NewTagType.php b/src/Wallabag/CoreBundle/Form/Type/NewTagType.php index c7568de7..3db4105f 100644 --- a/src/Wallabag/CoreBundle/Form/Type/NewTagType.php +++ b/src/Wallabag/CoreBundle/Form/Type/NewTagType.php | |||
@@ -12,15 +12,15 @@ class NewTagType extends AbstractType | |||
12 | public function buildForm(FormBuilderInterface $builder, array $options) | 12 | public function buildForm(FormBuilderInterface $builder, array $options) |
13 | { | 13 | { |
14 | $builder | 14 | $builder |
15 | ->add('label', TextType::class, array('required' => true)) | 15 | ->add('label', TextType::class, ['required' => true]) |
16 | ; | 16 | ; |
17 | } | 17 | } |
18 | 18 | ||
19 | public function configureOptions(OptionsResolver $resolver) | 19 | public function configureOptions(OptionsResolver $resolver) |
20 | { | 20 | { |
21 | $resolver->setDefaults(array( | 21 | $resolver->setDefaults([ |
22 | 'data_class' => 'Wallabag\CoreBundle\Entity\Tag', | 22 | 'data_class' => 'Wallabag\CoreBundle\Entity\Tag', |
23 | )); | 23 | ]); |
24 | } | 24 | } |
25 | 25 | ||
26 | public function getBlockPrefix() | 26 | public function getBlockPrefix() |
diff --git a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php index 60fcc20c..6a6f63d1 100644 --- a/src/Wallabag/CoreBundle/Form/Type/NewUserType.php +++ b/src/Wallabag/CoreBundle/Form/Type/NewUserType.php | |||
@@ -17,38 +17,38 @@ class NewUserType extends AbstractType | |||
17 | public function buildForm(FormBuilderInterface $builder, array $options) | 17 | public function buildForm(FormBuilderInterface $builder, array $options) |
18 | { | 18 | { |
19 | $builder | 19 | $builder |
20 | ->add('username', TextType::class, array( | 20 | ->add('username', TextType::class, [ |
21 | 'required' => true, | 21 | 'required' => true, |
22 | 'label' => 'config.form_new_user.username_label', | 22 | 'label' => 'config.form_new_user.username_label', |
23 | )) | 23 | ]) |
24 | ->add('plainPassword', RepeatedType::class, array( | 24 | ->add('plainPassword', RepeatedType::class, [ |
25 | 'type' => PasswordType::class, | 25 | 'type' => PasswordType::class, |
26 | 'invalid_message' => 'validator.password_must_match', | 26 | 'invalid_message' => 'validator.password_must_match', |
27 | 'first_options' => array('label' => 'config.form_new_user.password_label'), | 27 | 'first_options' => ['label' => 'config.form_new_user.password_label'], |
28 | 'second_options' => array('label' => 'config.form_new_user.repeat_new_password_label'), | 28 | 'second_options' => ['label' => 'config.form_new_user.repeat_new_password_label'], |
29 | 'constraints' => array( | 29 | 'constraints' => [ |
30 | new Constraints\Length(array( | 30 | new Constraints\Length([ |
31 | 'min' => 8, | 31 | 'min' => 8, |
32 | 'minMessage' => 'validator.password_too_short', | 32 | 'minMessage' => 'validator.password_too_short', |
33 | )), | 33 | ]), |
34 | new Constraints\NotBlank(), | 34 | new Constraints\NotBlank(), |
35 | ), | 35 | ], |
36 | 'label' => 'config.form_new_user.plain_password_label', | 36 | 'label' => 'config.form_new_user.plain_password_label', |
37 | )) | 37 | ]) |
38 | ->add('email', EmailType::class, array( | 38 | ->add('email', EmailType::class, [ |
39 | 'label' => 'config.form_new_user.email_label', | 39 | 'label' => 'config.form_new_user.email_label', |
40 | )) | 40 | ]) |
41 | ->add('save', SubmitType::class, array( | 41 | ->add('save', SubmitType::class, [ |
42 | 'label' => 'config.form.save', | 42 | 'label' => 'config.form.save', |
43 | )) | 43 | ]) |
44 | ; | 44 | ; |
45 | } | 45 | } |
46 | 46 | ||
47 | public function configureOptions(OptionsResolver $resolver) | 47 | public function configureOptions(OptionsResolver $resolver) |
48 | { | 48 | { |
49 | $resolver->setDefaults(array( | 49 | $resolver->setDefaults([ |
50 | 'data_class' => 'Wallabag\UserBundle\Entity\User', | 50 | 'data_class' => 'Wallabag\UserBundle\Entity\User', |
51 | )); | 51 | ]); |
52 | } | 52 | } |
53 | 53 | ||
54 | public function getBlockPrefix() | 54 | public function getBlockPrefix() |
diff --git a/src/Wallabag/CoreBundle/Form/Type/RssType.php b/src/Wallabag/CoreBundle/Form/Type/RssType.php index a9f68e54..94324fed 100644 --- a/src/Wallabag/CoreBundle/Form/Type/RssType.php +++ b/src/Wallabag/CoreBundle/Form/Type/RssType.php | |||
@@ -12,20 +12,20 @@ class RssType extends AbstractType | |||
12 | public function buildForm(FormBuilderInterface $builder, array $options) | 12 | public function buildForm(FormBuilderInterface $builder, array $options) |
13 | { | 13 | { |
14 | $builder | 14 | $builder |
15 | ->add('rss_limit', null, array( | 15 | ->add('rss_limit', null, [ |
16 | 'label' => 'config.form_rss.rss_limit', | 16 | 'label' => 'config.form_rss.rss_limit', |
17 | )) | 17 | ]) |
18 | ->add('save', SubmitType::class, array( | 18 | ->add('save', SubmitType::class, [ |
19 | 'label' => 'config.form.save', | 19 | 'label' => 'config.form.save', |
20 | )) | 20 | ]) |
21 | ; | 21 | ; |
22 | } | 22 | } |
23 | 23 | ||
24 | public function configureOptions(OptionsResolver $resolver) | 24 | public function configureOptions(OptionsResolver $resolver) |
25 | { | 25 | { |
26 | $resolver->setDefaults(array( | 26 | $resolver->setDefaults([ |
27 | 'data_class' => 'Wallabag\CoreBundle\Entity\Config', | 27 | 'data_class' => 'Wallabag\CoreBundle\Entity\Config', |
28 | )); | 28 | ]); |
29 | } | 29 | } |
30 | 30 | ||
31 | public function getBlockPrefix() | 31 | public function getBlockPrefix() |
diff --git a/src/Wallabag/CoreBundle/Form/Type/TaggingRuleType.php b/src/Wallabag/CoreBundle/Form/Type/TaggingRuleType.php index cfee21f1..732606c9 100644 --- a/src/Wallabag/CoreBundle/Form/Type/TaggingRuleType.php +++ b/src/Wallabag/CoreBundle/Form/Type/TaggingRuleType.php | |||
@@ -14,19 +14,19 @@ class TaggingRuleType extends AbstractType | |||
14 | public function buildForm(FormBuilderInterface $builder, array $options) | 14 | public function buildForm(FormBuilderInterface $builder, array $options) |
15 | { | 15 | { |
16 | $builder | 16 | $builder |
17 | ->add('rule', TextType::class, array( | 17 | ->add('rule', TextType::class, [ |
18 | 'required' => true, | 18 | 'required' => true, |
19 | 'label' => 'config.form_rules.rule_label', | 19 | 'label' => 'config.form_rules.rule_label', |
20 | )) | 20 | ]) |
21 | ->add('save', SubmitType::class, array( | 21 | ->add('save', SubmitType::class, [ |
22 | 'label' => 'config.form.save', | 22 | 'label' => 'config.form.save', |
23 | )) | 23 | ]) |
24 | ; | 24 | ; |
25 | 25 | ||
26 | $tagsField = $builder | 26 | $tagsField = $builder |
27 | ->create('tags', TextType::class, array( | 27 | ->create('tags', TextType::class, [ |
28 | 'label' => 'config.form_rules.tags_label', | 28 | 'label' => 'config.form_rules.tags_label', |
29 | )) | 29 | ]) |
30 | ->addModelTransformer(new StringToListTransformer(',')); | 30 | ->addModelTransformer(new StringToListTransformer(',')); |
31 | 31 | ||
32 | $builder->add($tagsField); | 32 | $builder->add($tagsField); |
@@ -34,9 +34,9 @@ class TaggingRuleType extends AbstractType | |||
34 | 34 | ||
35 | public function configureOptions(OptionsResolver $resolver) | 35 | public function configureOptions(OptionsResolver $resolver) |
36 | { | 36 | { |
37 | $resolver->setDefaults(array( | 37 | $resolver->setDefaults([ |
38 | 'data_class' => 'Wallabag\CoreBundle\Entity\TaggingRule', | 38 | 'data_class' => 'Wallabag\CoreBundle\Entity\TaggingRule', |
39 | )); | 39 | ]); |
40 | } | 40 | } |
41 | 41 | ||
42 | public function getBlockPrefix() | 42 | public function getBlockPrefix() |
diff --git a/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php b/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php index 799ea39e..07c99949 100644 --- a/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php +++ b/src/Wallabag/CoreBundle/Form/Type/UserInformationType.php | |||
@@ -15,19 +15,19 @@ class UserInformationType extends AbstractType | |||
15 | public function buildForm(FormBuilderInterface $builder, array $options) | 15 | public function buildForm(FormBuilderInterface $builder, array $options) |
16 | { | 16 | { |
17 | $builder | 17 | $builder |
18 | ->add('name', TextType::class, array( | 18 | ->add('name', TextType::class, [ |
19 | 'label' => 'config.form_user.name_label', | 19 | 'label' => 'config.form_user.name_label', |
20 | )) | 20 | ]) |
21 | ->add('email', EmailType::class, array( | 21 | ->add('email', EmailType::class, [ |
22 | 'label' => 'config.form_user.email_label', | 22 | 'label' => 'config.form_user.email_label', |
23 | )) | 23 | ]) |
24 | ->add('twoFactorAuthentication', CheckboxType::class, array( | 24 | ->add('twoFactorAuthentication', CheckboxType::class, [ |
25 | 'required' => false, | 25 | 'required' => false, |
26 | 'label' => 'config.form_user.twoFactorAuthentication_label', | 26 | 'label' => 'config.form_user.twoFactorAuthentication_label', |
27 | )) | 27 | ]) |
28 | ->add('save', SubmitType::class, array( | 28 | ->add('save', SubmitType::class, [ |
29 | 'label' => 'config.form.save', | 29 | 'label' => 'config.form.save', |
30 | )) | 30 | ]) |
31 | ->remove('username') | 31 | ->remove('username') |
32 | ->remove('plainPassword') | 32 | ->remove('plainPassword') |
33 | ; | 33 | ; |
@@ -40,9 +40,9 @@ class UserInformationType extends AbstractType | |||
40 | 40 | ||
41 | public function configureOptions(OptionsResolver $resolver) | 41 | public function configureOptions(OptionsResolver $resolver) |
42 | { | 42 | { |
43 | $resolver->setDefaults(array( | 43 | $resolver->setDefaults([ |
44 | 'data_class' => 'Wallabag\UserBundle\Entity\User', | 44 | 'data_class' => 'Wallabag\UserBundle\Entity\User', |
45 | )); | 45 | ]); |
46 | } | 46 | } |
47 | 47 | ||
48 | public function getBlockPrefix() | 48 | public function getBlockPrefix() |