You are here

public function LinkGeneratorTrait::setLinkGenerator in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Routing/LinkGeneratorTrait.php \Drupal\Core\Routing\LinkGeneratorTrait::setLinkGenerator()

Sets the link generator service.

Parameters

\Drupal\Core\Utility\LinkGeneratorInterface $generator: The link generator service.

Return value

$this

File

core/lib/Drupal/Core/Routing/LinkGeneratorTrait.php, line 66
Contains \Drupal\Core\Routing\LinkGeneratorTrait.

Class

LinkGeneratorTrait
Wrapper methods for the Link Generator.

Namespace

Drupal\Core\Routing

Code

public function setLinkGenerator(LinkGeneratorInterface $generator) {
  $this->linkGenerator = $generator;
  return $this;
}