From 2654e24913dc04a302af52633cc39f558b75da99 Mon Sep 17 00:00:00 2001 From: xjm Date: Sat, 21 Nov 2015 21:12:19 -0600 Subject: [PATCH] Issue #2606396 by sdstyles, dawehner: mark \Drupal\Core\Routing\LinkGeneratorTrait and \Drupal\Core\Routing\UrlGeneratorTrait as deprecated --- core/lib/Drupal/Core/Routing/LinkGeneratorTrait.php | 6 ++++++ core/lib/Drupal/Core/Routing/UrlGeneratorTrait.php | 6 ++++++ 2 files changed, 12 insertions(+) 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);