class LanguagesCacheContext
Defines the LanguagesCacheContext service, for "per language" caching.
Hierarchy
- class \Drupal\Core\Cache\Context\LanguagesCacheContext implements CalculatedCacheContextInterface
File
- core/lib/Drupal/Core/Cache/Context/LanguagesCacheContext.php, line 11
Namespace
Drupal\Core\Cache\ContextMembers
Name | Modifiers | Type | Description |
---|---|---|---|
LanguagesCacheContext::$languageManager | protected | property | The language manager. |
LanguagesCacheContext::getCacheableMetadata | public | function | Gets the cacheability metadata for the context based on the parameter value. Overrides CalculatedCacheContextInterface::getCacheableMetadata |
LanguagesCacheContext::getContext | public | function | $type can be NULL, or one of the language types supported by the language manager, typically: Overrides CalculatedCacheContextInterface::getContext |
LanguagesCacheContext::getLabel | public static | function | Returns the label of the cache context. Overrides CalculatedCacheContextInterface::getLabel |
LanguagesCacheContext::__construct | public | function | Constructs a new LanguagesCacheContext service. |
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Cache!Context!LanguagesCacheContext.php/class/LanguagesCacheContext/8.1.x