drupal_get_destination()
Prepares a 'destination' URL query parameter.
Used to direct the user back to the referring page after completing a form. By default the current URL is returned. If a destination exists in the previous request, that destination is returned. As such, a destination can persist across multiple pages.
array An associative array containing the key:
in Drupal 8.0.x-dev, will be removed before Drupal 9.0.0. Use the redirect.destination service.
\Drupal\Core\EventSubscriber\RedirectResponseSubscriber::checkRedirectUrl()
function drupal_get_destination() { return \Drupal::destination()->getAsArray(); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!includes!common.inc/function/drupal_get_destination/8.1.x