You are here

public function ConfirmFormArrayPathTestForm::getCancelUrl in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/system/tests/modules/form_test/src/ConfirmFormArrayPathTestForm.php \Drupal\form_test\ConfirmFormArrayPathTestForm::getCancelUrl()
  2. 9 core/modules/system/tests/modules/form_test/src/ConfirmFormArrayPathTestForm.php \Drupal\form_test\ConfirmFormArrayPathTestForm::getCancelUrl()

Returns the route to go to if the user cancels the action.

Return value

\Drupal\Core\Url A URL object.

Overrides ConfirmFormTestForm::getCancelUrl

File

core/modules/system/tests/modules/form_test/src/ConfirmFormArrayPathTestForm.php, line 24

Class

ConfirmFormArrayPathTestForm
Provides a test confirmation form with a complex cancellation destination.

Namespace

Drupal\form_test

Code

public function getCancelUrl() {
  return new Url('form_test.route6', [], [
    'query' => [
      'destination' => 'admin/config',
    ],
  ]);
}