function AjaxBasePageNegotiator::__construct

Same name in other branches
  1. 9 core/lib/Drupal/Core/Theme/AjaxBasePageNegotiator.php \Drupal\Core\Theme\AjaxBasePageNegotiator::__construct()
  2. 10 core/lib/Drupal/Core/Theme/AjaxBasePageNegotiator.php \Drupal\Core\Theme\AjaxBasePageNegotiator::__construct()
  3. 11.x core/lib/Drupal/Core/Theme/AjaxBasePageNegotiator.php \Drupal\Core\Theme\AjaxBasePageNegotiator::__construct()

Constructs a new AjaxBasePageNegotiator.

Parameters

\Drupal\Core\Access\CsrfTokenGenerator $token_generator: The CSRF token generator.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.

\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack used to retrieve the current request.

File

core/lib/Drupal/Core/Theme/AjaxBasePageNegotiator.php, line 58

Class

AjaxBasePageNegotiator
Defines a theme negotiator that deals with the active theme on ajax requests.

Namespace

Drupal\Core\Theme

Code

public function __construct(CsrfTokenGenerator $token_generator, ConfigFactoryInterface $config_factory, RequestStack $request_stack) {
    $this->csrfGenerator = $token_generator;
    $this->configFactory = $config_factory;
    $this->requestStack = $request_stack;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.