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.
Hierarchy
- trait \Drupal\Core\Routing\LinkGeneratorTrait
Deprecated
in Drupal 8.0.0 and will be removed before Drupal 9.0.0. Use \Drupal\Core\Link instead.
File
- core/lib/Drupal/Core/Routing/LinkGeneratorTrait.php, line 20
Namespace
Drupal\Core\Routing
Members
Name | Modifiers | Type | Description |
---|---|---|---|
LinkGeneratorTrait::$linkGenerator | protected | property | The link generator. |
LinkGeneratorTrait::getLinkGenerator | protected | function | Returns the link generator. |
LinkGeneratorTrait::l Deprecated | protected | function | Renders a link to a route given a route name and its parameters. |
LinkGeneratorTrait::setLinkGenerator | public | function | Sets the link generator service. |
Please login to continue.