You are here

public function HighContrastCacheContext::getContext in High contrast 8

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

src/Cache/Context/HighContrastCacheContext.php, line 26

Class

HighContrastCacheContext
Defines the HighContrastCacheContext service.

Namespace

Drupal\high_contrast\Cache\Context

Code

public function getContext() {
  return HighContrastTrait::highContrastEnabled();
}