Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Url.php

function Url::setUnrouted

Sets this URL to encapsulate an unrouted URI.

Return value

$this

File

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

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 = [];
    return $this;
}
RSS feed
Powered by Drupal