class RequestStackCacheContextBase

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Cache/Context/RequestStackCacheContextBase.php \Drupal\Core\Cache\Context\RequestStackCacheContextBase
  2. 10 core/lib/Drupal/Core/Cache/Context/RequestStackCacheContextBase.php \Drupal\Core\Cache\Context\RequestStackCacheContextBase
  3. 9 core/lib/Drupal/Core/Cache/Context/RequestStackCacheContextBase.php \Drupal\Core\Cache\Context\RequestStackCacheContextBase
  4. 8.9.x core/lib/Drupal/Core/Cache/Context/RequestStackCacheContextBase.php \Drupal\Core\Cache\Context\RequestStackCacheContextBase

Defines a base class for cache contexts depending only on the request stack.

Subclasses need to implement either \Drupal\Core\Cache\Context\CacheContextInterface or \Drupal\Core\Cache\Context\CalculatedCacheContextInterface.

Hierarchy

Expanded class hierarchy of RequestStackCacheContextBase

File

core/lib/Drupal/Core/Cache/Context/RequestStackCacheContextBase.php, line 14

Namespace

Drupal\Core\Cache\Context
View source
abstract class RequestStackCacheContextBase {
  
  /**
   * Constructs a new RequestStackCacheContextBase class.
   *
   * @param \Symfony\Component\HttpFoundation\RequestStack $requestStack
   *   The request stack.
   */
  public function __construct(protected RequestStack $requestStack) {
  }

}

Members

Title Sort descending Modifiers Object type Summary
RequestStackCacheContextBase::__construct public function Constructs a new RequestStackCacheContextBase class.

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