You are here

public function CommonTestController::destination in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/system/tests/modules/common_test/src/Controller/CommonTestController.php \Drupal\common_test\Controller\CommonTestController::destination()

Prints a destination query parameter.

Return value

\Symfony\Component\HttpFoundation\Response A new Response object containing a string with the destination query parameter.

1 string reference to 'CommonTestController::destination'
common_test.routing.yml in core/modules/system/tests/modules/common_test/common_test.routing.yml
core/modules/system/tests/modules/common_test/common_test.routing.yml

File

core/modules/system/tests/modules/common_test/src/Controller/CommonTestController.php, line 89

Class

CommonTestController
Controller routines for common_test routes.

Namespace

Drupal\common_test\Controller

Code

public function destination() {
  $destination = \Drupal::destination()
    ->getAsArray();
  $output = "The destination: " . Html::escape($destination['destination']);
  return new Response($output);
}