function Link::getLinkGenerator
Same name in other branches
- 8.9.x core/lib/Drupal/Core/Link.php \Drupal\Core\Link::getLinkGenerator()
- 10 core/lib/Drupal/Core/Link.php \Drupal\Core\Link::getLinkGenerator()
- 11.x core/lib/Drupal/Core/Link.php \Drupal\Core\Link::getLinkGenerator()
Returns the link generator.
Return value
\Drupal\Core\Utility\LinkGeneratorInterface The link generator
File
-
core/
lib/ Drupal/ Core/ Link.php, line 184
Class
- Link
- Defines an object that holds information about a link.
Namespace
Drupal\CoreCode
protected function getLinkGenerator() {
if (!isset($this->linkGenerator)) {
$this->linkGenerator = \Drupal::service('link_generator');
}
return $this->linkGenerator;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.