public RedirectDestination::getAsArray()
Prepares a 'destination' URL query parameter for use with \Drupal\Core\Url.
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 current request, that destination is returned. As such, a destination can persist across multiple pages.
array An associative array containing the key:
Overrides RedirectDestinationInterface::getAsArray
\Drupal\Core\EventSubscriber\RedirectResponseSubscriber::checkRedirectUrl()
public function getAsArray() { return ['destination' => $this->get()]; }
© 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!lib!Drupal!Core!Routing!RedirectDestination.php/function/RedirectDestination::getAsArray/8.1.x