Provides a class which generates a link with route names and parameters.
Hierarchy
- class \Drupal\Core\Utility\LinkGenerator implements LinkGeneratorInterface
File
- core/lib/Drupal/Core/Utility/LinkGenerator.php, line 20
Namespace
Drupal\Core\Utility
Members
Name | Modifiers | Type | Description |
---|---|---|---|
LinkGenerator::$moduleHandler | protected | property | The module handler firing the route_link alter hook. |
LinkGenerator::$renderer | protected | property | The renderer service. |
LinkGenerator::$urlGenerator | protected | property | The url generator. |
LinkGenerator::generate | public | function | For anonymous users, the "active" class will be calculated on the server, because most sites serve each anonymous user the same cached page anyway. For authenticated users, the "active" class will be calculated on the client… Overrides LinkGeneratorInterface::generate |
LinkGenerator::generateFromLink | public | function | Renders a link from a link object. Overrides LinkGeneratorInterface::generateFromLink |
LinkGenerator::__construct | public | function | Constructs a LinkGenerator instance. |
Please login to continue.