public function CalculatedCacheContextInterface::getContext in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/lib/Drupal/Core/Cache/Context/CalculatedCacheContextInterface.php \Drupal\Core\Cache\Context\CalculatedCacheContextInterface::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.
Parameters
string|null $parameter: The parameter, or NULL to indicate all possible parameter values.
Return value
string The string representation of the cache context. When $parameter is NULL, a value representing all possible parameters must be generated.
Throws
\LogicException Thrown if the passed in parameter is invalid.
9 methods override CalculatedCacheContextInterface::getContext()
- BazCacheContext::getContext in core/
tests/ Drupal/ Tests/ Core/ Cache/ Context/ CacheContextsManagerTest.php - Returns the string representation of the cache context.
- CookiesCacheContext::getContext in core/
lib/ Drupal/ Core/ Cache/ Context/ CookiesCacheContext.php - Returns the string representation of the cache context.
- HeadersCacheContext::getContext in core/
lib/ Drupal/ Core/ Cache/ Context/ HeadersCacheContext.php - Returns the string representation of the cache context.
- LanguagesCacheContext::getContext in core/
lib/ Drupal/ Core/ Cache/ Context/ LanguagesCacheContext.php - $type can be NULL, or one of the language types supported by the language manager, typically:
- MenuActiveTrailsCacheContext::getContext in core/
lib/ Drupal/ Core/ Cache/ Context/ MenuActiveTrailsCacheContext.php - Returns the string representation of the cache context.
File
- core/
lib/ Drupal/ Core/ Cache/ Context/ CalculatedCacheContextInterface.php, line 41 - Contains \Drupal\Core\Cache\Context\CalculatedCacheContextInterface.
Class
- CalculatedCacheContextInterface
- Provides an interface for defining a calculated cache context service.
Namespace
Drupal\Core\Cache\ContextCode
public function getContext($parameter = NULL);