public function Link::setLinkGenerator in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Link.php \Drupal\Core\Link::setLinkGenerator()
- 9 core/lib/Drupal/Core/Link.php \Drupal\Core\Link::setLinkGenerator()
Sets the link generator service.
Parameters
\Drupal\Core\Utility\LinkGeneratorInterface $generator: The link generator service.
Return value
$this
File
- core/
lib/ Drupal/ Core/ Link.php, line 199
Class
- Link
- Defines an object that holds information about a link.
Namespace
Drupal\CoreCode
public function setLinkGenerator(LinkGeneratorInterface $generator) {
$this->linkGenerator = $generator;
return $this;
}