getRedirectDestination()->getAsArray(); } /** * Returns the redirect destination service. * * @return \Drupal\Core\Routing\RedirectDestinationInterface * The redirect destination helper. */ protected function getRedirectDestination() { if (!isset($this->redirectDestination)) { $this->redirectDestination = \Drupal::destination(); } return $this->redirectDestination; } /** * Sets the redirect destination service. * * @param \Drupal\Core\Routing\RedirectDestinationInterface $redirect_destination * The redirect destination service. * * @return $this */ public function setRedirectDestination(RedirectDestinationInterface $redirect_destination) { $this->redirectDestination = $redirect_destination; return $this; } }