Issue #2606396 by sdstyles, dawehner: mark \Drupal\Core\Routing\LinkGeneratorTrait and \Drupal\Core\Routing\UrlGeneratorTrait as deprecated

8.1.x
xjm 2015-11-21 21:12:19 -06:00
parent e4387d24aa
commit 2654e24913
2 changed files with 12 additions and 0 deletions

View File

@ -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);

View File

@ -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);