RedirectDestinationInterface
interface RedirectDestinationInterface (View source)
Provides an interface for redirect destinations.
Methods
Prepares a 'destination' URL query parameter for use with \Drupal\Core\Url.
Gets the destination as a path.
Sets the destination as URL.
Details
array
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.
string
get()
Gets the destination as a path.
To convert to a URL suitable for \Symfony\Component\HttpFoundation\RedirectResponse::__construct() use
$this
set(string $new_destination)
Sets the destination as URL.
This method should be used really rarely, for example views uses it, in order to override all destination calls in all of its rendering.