8.5.x UrlGeneratorTrait.php UrlGeneratorTrait::setUrlGenerator(UrlGeneratorInterface $generator)
8.0.x UrlGeneratorTrait.php UrlGeneratorTrait::setUrlGenerator(UrlGeneratorInterface $generator)
8.1.x UrlGeneratorTrait.php UrlGeneratorTrait::setUrlGenerator(UrlGeneratorInterface $generator)
8.2.x UrlGeneratorTrait.php UrlGeneratorTrait::setUrlGenerator(UrlGeneratorInterface $generator)
8.3.x UrlGeneratorTrait.php UrlGeneratorTrait::setUrlGenerator(UrlGeneratorInterface $generator)
8.4.x UrlGeneratorTrait.php UrlGeneratorTrait::setUrlGenerator(UrlGeneratorInterface $generator)
8.6.x UrlGeneratorTrait.php UrlGeneratorTrait::setUrlGenerator(UrlGeneratorInterface $generator)

Sets the URL generator service.

Parameters

\Drupal\Core\Routing\UrlGeneratorInterface $generator: The url generator service.

Return value

$this

1 call to UrlGeneratorTrait::setUrlGenerator()
AccessDeniedSubscriber::__construct in core/modules/user/src/EventSubscriber/AccessDeniedSubscriber.php
Constructs a new redirect subscriber.

File

core/lib/Drupal/Core/Routing/UrlGeneratorTrait.php, line 88

Class

UrlGeneratorTrait
Wrapper methods for the Url Generator.

Namespace

Drupal\Core\Routing

Code

public function setUrlGenerator(UrlGeneratorInterface $generator) {
  $this->urlGenerator = $generator;
  return $this;
}