W3cubDocs

/Drupal 8

class LinkGenerator

Provides a class which generates a link with route names and parameters.

Hierarchy

File

core/lib/Drupal/Core/Utility/LinkGenerator.php, line 19

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.

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Utility!LinkGenerator.php/class/LinkGenerator/8.1.x