function PagersCacheContext::__construct

Same name in other branches
  1. 8.9.x core/lib/Drupal/Core/Cache/Context/PagersCacheContext.php \Drupal\Core\Cache\Context\PagersCacheContext::__construct()
  2. 10 core/lib/Drupal/Core/Cache/Context/PagersCacheContext.php \Drupal\Core\Cache\Context\PagersCacheContext::__construct()
  3. 11.x core/lib/Drupal/Core/Cache/Context/PagersCacheContext.php \Drupal\Core\Cache\Context\PagersCacheContext::__construct()

Constructs a new PagersCacheContext object.

Parameters

\Drupal\Core\Pager\PagerParametersInterface $pager_params: The pager parameters.

File

core/lib/Drupal/Core/Cache/Context/PagersCacheContext.php, line 30

Class

PagersCacheContext
Defines a cache context for "per page in a pager" caching.

Namespace

Drupal\Core\Cache\Context

Code

public function __construct(PagerParametersInterface $pager_params) {
    $this->pagerParams = $pager_params;
}

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