You are here

public function SessionExistsCacheContext::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Cache/Context/SessionExistsCacheContext.php \Drupal\Core\Cache\Context\SessionExistsCacheContext::__construct()

Constructs a new SessionExistsCacheContext class.

Parameters

\Drupal\Core\Session\SessionConfigurationInterface $session_configuration: The session configuration.

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

File

core/lib/Drupal/Core/Cache/Context/SessionExistsCacheContext.php, line 38

Class

SessionExistsCacheContext
Defines the SessionExistsCacheContext service, for "session or not" caching.

Namespace

Drupal\Core\Cache\Context

Code

public function __construct(SessionConfigurationInterface $session_configuration, RequestStack $request_stack) {
  $this->sessionConfiguration = $session_configuration;
  $this->requestStack = $request_stack;
}