Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. FinishResponseSubscriber.php

function FinishResponseSubscriber::__construct

Constructs a FinishResponseSubscriber object.

Parameters

\Drupal\Core\Language\LanguageManagerInterface $languageManager: The language manager object for retrieving the correct language code.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: A config factory for retrieving required config objects.

\Drupal\Core\PageCache\RequestPolicyInterface $requestPolicy: A policy rule determining the cacheability of a request.

\Drupal\Core\PageCache\ResponsePolicyInterface $responsePolicy: A policy rule determining the cacheability of a response.

\Drupal\Core\Cache\Context\CacheContextsManager $cacheContextsManager: The cache contexts manager service.

\Drupal\Component\Datetime\TimeInterface $time: The time service.

bool $debugCacheabilityHeaders: (optional) Whether to send cacheability headers for debugging purposes.

File

core/lib/Drupal/Core/EventSubscriber/FinishResponseSubscriber.php, line 50

Class

FinishResponseSubscriber
Response subscriber to handle finished responses.

Namespace

Drupal\Core\EventSubscriber

Code

public function __construct(LanguageManagerInterface $languageManager, ConfigFactoryInterface $config_factory, RequestPolicyInterface $requestPolicy, ResponsePolicyInterface $responsePolicy, CacheContextsManager $cacheContextsManager, TimeInterface $time, bool $debugCacheabilityHeaders = FALSE) {
    $this->config = $config_factory->get('system.performance');
}
RSS feed
Powered by Drupal