Skip to content

Commit

Permalink
Replace 'anchor' Type name references
Browse files Browse the repository at this point in the history
Replaced with the AnchorType::class FQDN.

Update call to OptRes::setAllowedTypes() to match new signature.
  • Loading branch information
MKodde committed Sep 6, 2018
1 parent de11419 commit e4bb21f
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 42 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,11 @@ public function buildForm(FormBuilderInterface $builder, array $options)
'label' => 'ra.management.form.amend_ra_info.label.amend_ra_info',
'attr' => ['class' => 'btn btn-primary pull-right']
])
->add(
'cancel',
'anchor',
[
'label' => 'ra.management.form.amend_ra_info.label.cancel',
'route' => 'ra_management_manage',
'attr' => ['class' => 'btn btn-link pull-right cancel']
]
)
->add('cancel', AnchorType::class, [
'label' => 'ra.management.form.amend_ra_info.label.cancel',
'route' => 'ra_management_manage',
'attr' => ['class' => 'btn btn-link pull-right cancel']
])
;
}

Expand Down
6 changes: 2 additions & 4 deletions src/Surfnet/StepupRa/RaBundle/Form/Type/AnchorType.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,8 @@ public function configureOptions(OptionsResolver $resolver)

$resolver->setRequired(['route']);

$resolver->setAllowedTypes([
'route' => 'string',
'route_parameters' => 'array',
]);
$resolver->setAllowedTypes('route', 'string');
$resolver->setAllowedTypes('route_parameters', 'array');
}

public function buildView(FormView $view, FormInterface $form, array $options)
Expand Down
14 changes: 5 additions & 9 deletions src/Surfnet/StepupRa/RaBundle/Form/Type/ChangeRaLocationType.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,11 @@ public function buildForm(FormBuilderInterface $builder, array $options)
'label' => 'ra.management.form.change_ra_location.label.change_ra_location',
'attr' => ['class' => 'btn btn-primary pull-right change-ra-location']
])
->add(
'cancel',
'anchor',
[
'label' => 'ra.management.form.change_ra_location.label.cancel',
'route' => 'ra_locations_manage',
'attr' => ['class' => 'btn btn-link pull-right cancel']
]
)
->add('cancel', AnchorType::class, [
'label' => 'ra.management.form.change_ra_location.label.cancel',
'route' => 'ra_locations_manage',
'attr' => ['class' => 'btn btn-link pull-right cancel'],
])
;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
'label' => 'ra.management.form.change_ra_role.label.save',
'attr' => ['class' => 'btn btn-primary pull-right change-ra-role']
])
->add('cancel', 'anchor', [
->add('cancel', AnchorType::class, [
'label' => 'ra.management.form.create_ra.label.cancel',
'route' => 'ra_management_ra_candidate_search',
'attr' => ['class' => 'btn btn-link pull-right cancel']
Expand Down
14 changes: 5 additions & 9 deletions src/Surfnet/StepupRa/RaBundle/Form/Type/CreateRaLocationType.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,11 @@ public function buildForm(FormBuilderInterface $builder, array $options)
'label' => 'ra.form.ra_create_ra_location.label.create_ra_location',
'attr' => ['class' => 'btn btn-primary pull-right create-ra-location']
])
->add(
'cancel',
'anchor',
[
'label' => 'ra.form.ra_create_ra_location.label.cancel',
'route' => 'ra_locations_manage',
'attr' => ['class' => 'btn btn-link pull-right cancel']
]
)
->add('cancel', AnchorType::class, [
'label' => 'ra.form.ra_create_ra_location.label.cancel',
'route' => 'ra_locations_manage',
'attr' => ['class' => 'btn btn-link pull-right cancel']
])
;
}

Expand Down
14 changes: 5 additions & 9 deletions src/Surfnet/StepupRa/RaBundle/Form/Type/CreateRaType.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,15 +46,11 @@ public function buildForm(FormBuilderInterface $builder, array $options)
'label' => 'ra.management.form.create_ra.label.create_ra',
'attr' => ['class' => 'btn btn-primary pull-right create-ra']
])
->add(
'cancel',
'anchor',
[
'label' => 'ra.management.form.create_ra.label.cancel',
'route' => 'ra_management_ra_candidate_search',
'attr' => ['class' => 'btn btn-link pull-right cancel']
]
)
->add('cancel', AnchorType::class, [
'label' => 'ra.management.form.create_ra.label.cancel',
'route' => 'ra_management_ra_candidate_search',
'attr' => ['class' => 'btn btn-link pull-right cancel']
])
;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
'label' => 'ra.form.ra_verify_phone_number.button.verify_challenge',
'attr' => [ 'class' => 'btn btn-primary pull-right' ],
]);
$builder->add('resendChallenge', 'anchor', [
$builder->add('resendChallenge', AnchorType::class, [
'label' => 'ra.form.ra_verify_phone_number.button.resend_challenge',
'attr' => [ 'class' => 'btn btn-default' ],
'route' => 'ra_vetting_sms_send_challenge',
Expand Down

0 comments on commit e4bb21f

Please sign in to comment.