You are here

protected function Url::urlGenerator in Persistent URL 8

Gets the URL generator.

Return value

\Drupal\Core\Routing\UrlGeneratorInterface The URL generator.

Overrides Url::urlGenerator

File

src/Url.php, line 16

Class

Url

Namespace

Drupal\purl

Code

protected function urlGenerator() {
  if (!$this->urlGenerator) {
    $this->urlGenerator = \Drupal::getContainer()
      ->get('purl.url_generator');
  }
  return $this->urlGenerator;
}