protected LinkGeneratorTrait::getLinkGenerator()
Returns the link generator.
Return value
\Drupal\Core\Utility\LinkGeneratorInterface The link generator
File
- core/lib/Drupal/Core/Routing/LinkGeneratorTrait.php, line 54
Class
- LinkGeneratorTrait
- Wrapper methods for the Link Generator.
Namespace
Drupal\Core\Routing
Code
protected function getLinkGenerator() { if (!isset($this->linkGenerator)) { $this->linkGenerator = \Drupal::service('link_generator'); } return $this->linkGenerator; }
Please login to continue.