public function RedirectDestination::get in Bakery Single Sign-On System 8.2
Gets the destination as a path.
To convert to a URL suitable for \Symfony\Component\HttpFoundation\RedirectResponse::__construct() use
\Drupal\Core\Url::fromUserInput(\Drupal::destination()
  ->get())
  ->setAbsolute()
  ->toString();
Return value
string
Overrides RedirectDestinationInterface::get
1 call to RedirectDestination::get()
- RedirectDestination::getAsArray in src/
RedirectDestination.php  - Prepares a 'destination' URL query parameter for use with \Drupal\Core\Url.
 
File
- src/
RedirectDestination.php, line 76  
Class
Namespace
Drupal\bakeryCode
public function get() {
  if (!isset($this->destination)) {
    if ($this->config
      ->get('bakery_is_master')) {
      $this->destination = $this
        ->getChildDestination();
    }
    else {
      $this->destination = $this
        ->getParentDestination();
    }
  }
  if ($this->destination instanceof Url) {
    return $this->destination
      ->toString();
  }
  return $this->destination;
}