You are here

public function EntityTestViewGrantsCacheContext::getContext in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/tests/modules/entity_test/src/Cache/EntityTestViewGrantsCacheContext.php \Drupal\entity_test\Cache\EntityTestViewGrantsCacheContext::getContext()

Returns the string representation of the cache context.

A cache context service's name is used as a token (placeholder) cache key, and is then replaced with the string returned by this method.

Return value

string The string representation of the cache context.

Overrides CacheContextInterface::getContext

File

core/modules/system/tests/modules/entity_test/src/Cache/EntityTestViewGrantsCacheContext.php, line 32
Contains \Drupal\entity_test\Cache\EntityTestViewGrantsCacheContext.

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';
}