Url::getInfo

public Url::getInfo() Returns the element properties for this element. Return value array An array of element properties. See \Drupal\Core\Render\ElementInfoManagerInterface::getInfo() for documentation of the standard properties of all elements, and the return value format. Overrides ElementInterface::getInfo File core/lib/Drupal/Core/Render/Element/Url.php, line 34 Class Url Provides a form element for input of a URL. Namespace Drupal\Core\Render\Element Code public function getInfo

Url::getInternalPath

public Url::getInternalPath() Returns the internal path (system path) for this route. This path will not include any prefixes, fragments, or query strings. Return value string The internal path for this route. Throws \UnexpectedValueException. If this is a URI with no corresponding system path. File core/lib/Drupal/Core/Url.php, line 766 Class Url Defines an object that holds information about a URL. Namespace Drupal\Core Code public function getInternalPath() { if ($this->unrou

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 $

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::getRouteParameters

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

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::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::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::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.