function EntityTestViewGrantsCacheContext::getContext

Same name in other branches
  1. 9 core/modules/system/tests/modules/entity_test/src/Cache/EntityTestViewGrantsCacheContext.php \Drupal\entity_test\Cache\EntityTestViewGrantsCacheContext::getContext()
  2. 10 core/modules/system/tests/modules/entity_test/src/Cache/EntityTestViewGrantsCacheContext.php \Drupal\entity_test\Cache\EntityTestViewGrantsCacheContext::getContext()
  3. 11.x core/modules/system/tests/modules/entity_test/src/Cache/EntityTestViewGrantsCacheContext.php \Drupal\entity_test\Cache\EntityTestViewGrantsCacheContext::getContext()

Overrides CacheContextInterface::getContext

File

core/modules/system/tests/modules/entity_test/src/Cache/EntityTestViewGrantsCacheContext.php, line 27

Class

EntityTestViewGrantsCacheContext
Defines the entity_test view grants cache context service.

Namespace

Drupal\entity_test\Cache

Code

public function getContext() {
    // Return a constant value, so we can fetch render cache both in actual
    // requests and test code itself.
    return '299792458';
}

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