You are here

protected function WebformTemplatesController::ensureDestination in Webform 8.5

Same name and namespace in other branches
  1. 6.x modules/webform_templates/src/Controller/WebformTemplatesController.php \Drupal\webform_templates\Controller\WebformTemplatesController::ensureDestination()

Ensures that a destination is present on the given URL.

Parameters

\Drupal\Core\Url $url: The URL object to which the destination should be added.

Return value

\Drupal\Core\Url The updated URL object.

1 call to WebformTemplatesController::ensureDestination()
WebformTemplatesController::index in modules/webform_templates/src/Controller/WebformTemplatesController.php
Returns the webform templates index page.

File

modules/webform_templates/src/Controller/WebformTemplatesController.php, line 308

Class

WebformTemplatesController
Provides route responses for webform templates.

Namespace

Drupal\webform_templates\Controller

Code

protected function ensureDestination(Url $url) {
  return $url
    ->mergeOptions([
    'query' => $this
      ->getRedirectDestination()
      ->getAsArray(),
  ]);
}