protected function CacheContexts::getContext in Render cache 7.2
Provides the string representation of a cache context.
Parameters
string $context: A cache context token of an available cache context service.
Return value
string The string representation of a cache context.
1 call to CacheContexts::getContext()
- CacheContexts::convertTokensToKeys in lib/
Drupal/ Core/ Cache/ CacheContexts.php - Converts cache context tokens to string representations of the context.
File
- lib/
Drupal/ Core/ Cache/ CacheContexts.php, line 110 - Contains \Drupal\Core\Cache\CacheContexts.
Class
- CacheContexts
- Defines the CacheContexts service.
Namespace
Drupal\Core\CacheCode
protected function getContext($context) {
return $this
->getService($context)
->getContext();
}