You are here

public function RequestContext::fromRequestStack in Zircon Profile 8

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

Populates the context from the current request from the request stack.

Parameters

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

File

core/lib/Drupal/Core/Routing/RequestContext.php, line 35
Contains \Drupal\Core\Routing\RequestContext.

Class

RequestContext
Holds information about the current request.

Namespace

Drupal\Core\Routing

Code

public function fromRequestStack(RequestStack $request_stack) {
  $this
    ->fromRequest($request_stack
    ->getCurrentRequest());
}