diff --git a/core/lib/Drupal/Core/Routing/LinkGeneratorTrait.php b/core/lib/Drupal/Core/Routing/LinkGeneratorTrait.php index dc2c9de0757..95553af86f8 100644 --- a/core/lib/Drupal/Core/Routing/LinkGeneratorTrait.php +++ b/core/lib/Drupal/Core/Routing/LinkGeneratorTrait.php @@ -3,6 +3,9 @@ /** * @file * Contains \Drupal\Core\Routing\LinkGeneratorTrait. + * + * @deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. + * Use \Drupal\Core\Link instead. */ namespace Drupal\Core\Routing; @@ -37,6 +40,9 @@ trait LinkGeneratorTrait { * @return \Drupal\Core\GeneratedLink * A GeneratedLink object containing a link to the given route and * parameters and bubbleable metadata. + * + * @deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. + * Use \Drupal\Core\Link instead. */ protected function l($text, Url $url) { return $this->getLinkGenerator()->generate($text, $url); diff --git a/core/lib/Drupal/Core/Routing/UrlGeneratorTrait.php b/core/lib/Drupal/Core/Routing/UrlGeneratorTrait.php index 5a63105e72f..31dd2864cd6 100644 --- a/core/lib/Drupal/Core/Routing/UrlGeneratorTrait.php +++ b/core/lib/Drupal/Core/Routing/UrlGeneratorTrait.php @@ -3,6 +3,9 @@ /** * @file * Contains \Drupal\Core\Routing\UrlGeneratorTrait. + * + * @deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. + * Use \Drupal\Core\Url instead. */ namespace Drupal\Core\Routing; @@ -34,6 +37,9 @@ trait UrlGeneratorTrait { * * @return string * The generated URL for the given route. + * + * @deprecated in Drupal 8.0.0 and will be removed before Drupal 9.0.0. + * Use \Drupal\Core\Url instead. */ protected function url($route_name, $route_parameters = array(), $options = array()) { return $this->getUrlGenerator()->generateFromRoute($route_name, $route_parameters, $options);