Url::isRouted

public Url::isRouted() Indicates if this Url has a Drupal route. Return value bool File core/lib/Drupal/Core/Url.php, line 540 Class Url Defines an object that holds information about a URL. Namespace Drupal\Core Code public function isRouted() { return !$this->unrouted; }

Url::setOption

public Url::setOption($name, $value) Sets a specific option. See \Drupal\Core\Url::fromUri() for details on the options. Parameters string $name: The name of the option. mixed $value: The option value. Return value $this File core/lib/Drupal/Core/Url.php, line 672 Class Url Defines an object that holds information about a URL. Namespace Drupal\Core Code public function setOption($name, $value) { $this->options[$name] = $value; return $this; }

Url::setOptions

public Url::setOptions($options) Sets the URL options. Parameters array $options: The array of options. See \Drupal\Core\Url::fromUri() for details on what it contains. Return value $this File core/lib/Drupal/Core/Url.php, line 655 Class Url Defines an object that holds information about a URL. Namespace Drupal\Core Code public function setOptions($options) { $this->options = $options; return $this; }

Url::preRenderUrl

public static Url::preRenderUrl($element) Prepares a #type 'url' render element for input.html.twig. Parameters array $element: An associative array containing the properties of the element. Properties used: #title, #value, #description, #size, #maxlength, #placeholder, #required, #attributes. Return value array The $element with prepared variables ready for input.html.twig. File core/lib/Drupal/Core/Render/Element/Url.php, line 82 Class Url Provides a form element for input of a URL.

Url::setAbsolute

public Url::setAbsolute($absolute = TRUE) Sets the value of the absolute option for this Url. Parameters bool $absolute: (optional) Whether to make this Url absolute or not. Defaults to TRUE. Return value $this File core/lib/Drupal/Core/Url.php, line 704 Class Url Defines an object that holds information about a URL. Namespace Drupal\Core Code public function setAbsolute($absolute = TRUE) { $this->options['absolute'] = $absolute; return $this; }

Url::isExternal

public Url::isExternal() Indicates if this Url is external. Return value bool File core/lib/Drupal/Core/Url.php, line 531 Class Url Defines an object that holds information about a URL. Namespace Drupal\Core Code public function isExternal() { return $this->external; }

Url::getUri

public Url::getUri() Returns the URI value for this Url object. Only to be used if self::$unrouted is TRUE. Return value string A URI not connected to a route. May be an external URL. Throws \UnexpectedValueException Thrown when the URI was requested for a routed URL. File core/lib/Drupal/Core/Url.php, line 688 Class Url Defines an object that holds information about a URL. Namespace Drupal\Core Code public function getUri() { if (!$this->unrouted) { throw new \UnexpectedVal

Url::getOptions

public Url::getOptions() Returns the URL options. Return value array The array of options. See \Drupal\Core\Url::fromUri() for details on what it contains. File core/lib/Drupal/Core/Url.php, line 623 Class Url Defines an object that holds information about a URL. Namespace Drupal\Core Code public function getOptions() { return $this->options; }

Url::getRouteName

public Url::getRouteName() Returns the route name. Return value string Throws \UnexpectedValueException. If this is a URI with no corresponding route. File core/lib/Drupal/Core/Url.php, line 552 Class Url Defines an object that holds information about a URL. Namespace Drupal\Core Code public function getRouteName() { if ($this->unrouted) { throw new \UnexpectedValueException('External URLs do not have an internal route name.'); } return $this->routeName; }

Url::getOption

public Url::getOption($name) Gets a specific option. See \Drupal\Core\Url::fromUri() for details on the options. Parameters string $name: The name of the option. Return value mixed The value for a specific option, or NULL if it does not exist. File core/lib/Drupal/Core/Url.php, line 638 Class Url Defines an object that holds information about a URL. Namespace Drupal\Core Code public function getOption($name) { if (!isset($this->options[$name])) { return NULL; } return $