public function CacheContexts::__construct in Render cache 7.2
Same name in this branch
- 7.2 src/Cache/CacheContexts.php \Drupal\render_cache\Cache\CacheContexts::__construct()
 - 7.2 lib/Drupal/Core/Cache/CacheContexts.php \Drupal\Core\Cache\CacheContexts::__construct()
 
Constructs a CacheContexts object.
Parameters
\Symfony\Component\DependencyInjection\ContainerInterface $container: The current service container.
array $contexts: An array of key-value pairs, where the keys are service names (which also serve as the corresponding cache context token) and the values are the cache context labels.
1 method overrides CacheContexts::__construct()
- CacheContexts::__construct in src/
Cache/ CacheContexts.php  - Constructs a CacheContexts object.
 
File
- lib/
Drupal/ Core/ Cache/ CacheContexts.php, line 45  - Contains \Drupal\Core\Cache\CacheContexts.
 
Class
- CacheContexts
 - Defines the CacheContexts service.
 
Namespace
Drupal\Core\CacheCode
public function __construct(ContainerInterface $container, array $contexts) {
  $this->container = $container;
  $this->contexts = $contexts;
}