public function EntityTestViewGrantsCacheContext::getContext in Drupal 9
Same name and namespace in other branches
- 8 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 27
Class
- EntityTestViewGrantsCacheContext
- Defines the entity_test view grants cache context service.
Namespace
Drupal\entity_test\CacheCode
public function getContext() {
// Return a constant value, so we can fetch render cache both in actual
// requests and test code itself.
return '299792458';
}