LinkGeneratorTrait deprecated
trait LinkGeneratorTrait (View source)
deprecated
Wrapper methods for the Link Generator.
This utility trait should only be used in application-level code, such as classes that would implement ContainerInjectionInterface. Services registered in the Container should not use this trait but inject the appropriate service directly for easier testing.
Properties
| protected LinkGeneratorInterface | $linkGenerator | The link generator. |
Methods
Details
protected GeneratedLink
l($text, Url $url)
deprecated
deprecated
Renders a link to a route given a route name and its parameters.
For details on the arguments, usage, and possible exceptions see \Drupal\Core\Utility\LinkGeneratorInterface::generate().
protected LinkGeneratorInterface
getLinkGenerator()
deprecated
deprecated
Returns the link generator.
$this
setLinkGenerator(LinkGeneratorInterface $generator)
deprecated
deprecated
Sets the link generator service.