Issue #2606396 by sdstyles, dawehner: mark \Drupal\Core\Routing\LinkGeneratorTrait and \Drupal\Core\Routing\UrlGeneratorTrait as deprecated
parent
e4387d24aa
commit
2654e24913
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue