LinkGeneratorTrait::getLinkGenerator

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;
}
doc_Drupal
2016-10-29 09:23:19
Comments
Leave a Comment

Please login to continue.