diff --git a/core/lib/Drupal/Core/Render/Element/Link.php b/core/lib/Drupal/Core/Render/Element/Link.php index 12bddb7..750a22b 100644 --- a/core/lib/Drupal/Core/Render/Element/Link.php +++ b/core/lib/Drupal/Core/Render/Element/Link.php @@ -88,6 +88,7 @@ public static function preRenderLink($element) { $element['#markup'] = \Drupal::l($element['#title'], new Url($element['#route_name'], $element['#route_parameters'], $element['#options'])); } else { + // @todo Convert to \Drupal::l(): https://www.drupal.org/node/2347045. $element['#markup'] = l($element['#title'], $element['#href'], $element['#options']); } return $element; diff --git a/core/lib/Drupal/Core/Url.php b/core/lib/Drupal/Core/Url.php index 5fc1c31..82a4502 100644 --- a/core/lib/Drupal/Core/Url.php +++ b/core/lib/Drupal/Core/Url.php @@ -197,13 +197,13 @@ public static function routed($route_name, $route_parameters = array(), $options * A new Url object for an unrouted (non-Drupal) URL. * * @throws \InvalidArgumentException - * Thrown when the passed in path has no schema. + * Thrown when the passed in path has no scheme. * * @see static::routed() */ public static function unrouted($uri, $options = array()) { if (!parse_url($uri, PHP_URL_SCHEME)) { - throw new \InvalidArgumentException('You must use a valid URI scheme. Use base:// for a path e.g. to a Drupal file that needs the base path.'); + throw new \InvalidArgumentException('You must use a valid URI scheme. Use base:// for a path e.g. to a Drupal file that needs the base path.'); } $url = new static($uri, array(), $options); @@ -459,6 +459,7 @@ public function toString() { public function toArray() { if ($this->unrouted) { return array( + // @todo Change 'path' to 'href': https://www.drupal.org/node/2347025. 'path' => $this->getUri(), 'options' => $this->getOptions(), ); diff --git a/core/lib/Drupal/Core/Utility/UnroutedUrlAssembler.php b/core/lib/Drupal/Core/Utility/UnroutedUrlAssembler.php index 05fb19f..52d1d13 100644 --- a/core/lib/Drupal/Core/Utility/UnroutedUrlAssembler.php +++ b/core/lib/Drupal/Core/Utility/UnroutedUrlAssembler.php @@ -56,7 +56,7 @@ public function assemble($uri, array $options = []) { // UrlHelper::isExternal() only returns true for safe protocols. return $this->buildExternalUrl($uri, $options); } - throw new \InvalidArgumentException('You must use a valid URI scheme. Use base:// for a path e.g. to a Drupal file that needs the base path.'); + throw new \InvalidArgumentException('You must use a valid URI scheme. Use base:// for a path e.g. to a Drupal file that needs the base path.'); } /** diff --git a/core/lib/Drupal/Core/Utility/UnroutedUrlAssemblerInterface.php b/core/lib/Drupal/Core/Utility/UnroutedUrlAssemblerInterface.php index f72d876..c1caa44 100644 --- a/core/lib/Drupal/Core/Utility/UnroutedUrlAssemblerInterface.php +++ b/core/lib/Drupal/Core/Utility/UnroutedUrlAssemblerInterface.php @@ -51,7 +51,7 @@ * A string containing a relative or absolute URL. * * @throws \InvalidArgumentException - * Thrown when the passed in path has no schema. + * Thrown when the passed in path has no scheme. */ public function assemble($uri, array $options = array());