function PlaceholderingRenderCache::__construct

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

Constructs a new PlaceholderingRenderCache object.

Parameters

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

\Drupal\Core\Cache\CacheFactoryInterface $cache_factory: The cache factory.

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

\Drupal\Core\Render\PlaceholderGeneratorInterface $placeholder_generator: The placeholder generator.

Overrides RenderCache::__construct

File

core/lib/Drupal/Core/Render/PlaceholderingRenderCache.php, line 86

Class

PlaceholderingRenderCache
Adds automatic placeholdering to the RenderCache.

Namespace

Drupal\Core\Render

Code

public function __construct(RequestStack $request_stack, CacheFactoryInterface $cache_factory, CacheContextsManager $cache_contexts_manager, PlaceholderGeneratorInterface $placeholder_generator) {
    parent::__construct($request_stack, $cache_factory, $cache_contexts_manager);
    $this->placeholderGenerator = $placeholder_generator;
}

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