protected function Url::setUnrouted

protected Url::setUnrouted()

Sets this Url to encapsulate an unrouted URI.

Return value

$this

File

core/lib/Drupal/Core/Url.php, line 489

Class

Url
Defines an object that holds information about a URL.

Namespace

Drupal\Core

Code

protected function setUnrouted() {
  $this->unrouted = TRUE;
  // What was passed in as the route name is actually the URI.
  // @todo Consider fixing this in https://www.drupal.org/node/2346787.
  $this->uri = $this->routeName;
  // Set empty route name and parameters.
  $this->routeName = NULL;
  $this->routeParameters = array();
  return $this;
}

© 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!Url.php/function/Url::setUnrouted/8.1.x