protected function Link::getLinkGenerator in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Link.php \Drupal\Core\Link::getLinkGenerator()
- 9 core/lib/Drupal/Core/Link.php \Drupal\Core\Link::getLinkGenerator()
Returns the link generator.
Return value
\Drupal\Core\Utility\LinkGeneratorInterface The link generator
1 call to Link::getLinkGenerator()
- Link::toString in core/
lib/ Drupal/ Core/ Link.php - Generates the HTML for this Link object.
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;
}