function Url::setUnrouted
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Url.php \Drupal\Core\Url::setUnrouted()
- 10 core/lib/Drupal/Core/Url.php \Drupal\Core\Url::setUnrouted()
- 11.x core/lib/Drupal/Core/Url.php \Drupal\Core\Url::setUnrouted()
Sets this URL to encapsulate an unrouted URI.
Return value
$this
File
-
core/
lib/ Drupal/ Core/ Url.php, line 502
Class
- Url
- Defines an object that holds information about a URL.
Namespace
Drupal\CoreCode
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 = [];
return $this;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.