public function NullGenerator::__construct

public NullGenerator::__construct(RequestStack $request_stack)

Override the parent constructor.

Parameters

\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.

Overrides UrlGenerator::__construct

File

core/lib/Drupal/Core/Routing/NullGenerator.php, line 22

Class

NullGenerator
No-op implementation of a Url Generator, needed for backward compatibility.

Namespace

Drupal\Core\Routing

Code

public function __construct(RequestStack $request_stack) {
  $this->requestStack = $request_stack;
  $this->context = new RequestContext();
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Routing!NullGenerator.php/function/NullGenerator::__construct/8.1.x