function Context::getCacheContexts

Same name in other branches
  1. 9 core/lib/Drupal/Core/Plugin/Context/Context.php \Drupal\Core\Plugin\Context\Context::getCacheContexts()
  2. 10 core/lib/Drupal/Core/Plugin/Context/Context.php \Drupal\Core\Plugin\Context\Context::getCacheContexts()
  3. 11.x core/lib/Drupal/Core/Plugin/Context/Context.php \Drupal\Core\Plugin\Context\Context::getCacheContexts()

Overrides CacheableDependencyInterface::getCacheContexts

File

core/lib/Drupal/Core/Plugin/Context/Context.php, line 153

Class

Context
A Drupal specific context wrapper class.

Namespace

Drupal\Core\Plugin\Context

Code

public function getCacheContexts() {
    return $this->cacheabilityMetadata
        ->getCacheContexts();
}

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