function CacheContextsManager::__construct
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php \Drupal\Core\Cache\Context\CacheContextsManager::__construct()
- 10 core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php \Drupal\Core\Cache\Context\CacheContextsManager::__construct()
- 9 core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php \Drupal\Core\Cache\Context\CacheContextsManager::__construct()
- 8.9.x core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php \Drupal\Core\Cache\Context\CacheContextsManager::__construct()
Constructs a CacheContextsManager object.
Parameters
\Symfony\Component\DependencyInjection\ContainerInterface $container: The current service container.
string[] $contexts: An array of the available cache context IDs.
File
-
core/
lib/ Drupal/ Core/ Cache/ Context/ CacheContextsManager.php, line 38
Class
- CacheContextsManager
- Converts cache context tokens into cache keys.
Namespace
Drupal\Core\Cache\ContextCode
public function __construct(protected ContainerInterface $container, protected array $contexts) {
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.