protected CacheContextsManager::getService($context_id)
Retrieves a cache context service from the container.
Parameters
string $context_id: The context ID, which together with the service ID prefix allows the corresponding cache context service to be retrieved.
Return value
\Drupal\Core\Cache\Context\CacheContextInterface The requested cache context service.
File
- core/lib/Drupal/Core/Cache/Context/CacheContextsManager.php, line 216
Class
- CacheContextsManager
- Converts cache context tokens into cache keys.
Namespace
Drupal\Core\Cache\Context
Code
protected function getService($context_id) { return $this->container->get('cache_context.' . $context_id); }
Please login to continue.