RedirectDestinationTrait
trait RedirectDestinationTrait (View source)
Wrapper methods for the Redirect Destination.
This utility trait should only be used in application-level code, such as classes that would implement ContainerInjectionInterface. Services registered in the Container should not use this trait but inject the appropriate service directly for easier testing.
Properties
| protected RedirectDestinationInterface | $redirectDestination | The redirect destination service. |
Methods
array
getDestinationArray()
Prepares a 'destination' URL query parameter for use with \Drupal\Core\Url.
getRedirectDestination()
Returns the redirect destination service.
$this
setRedirectDestination(RedirectDestinationInterface $redirect_destination)
Sets the redirect destination service.
Details
protected array
getDestinationArray()
Prepares a 'destination' URL query parameter for use with \Drupal\Core\Url.
protected RedirectDestinationInterface
getRedirectDestination()
Returns the redirect destination service.
$this
setRedirectDestination(RedirectDestinationInterface $redirect_destination)
Sets the redirect destination service.