function Context::addCacheableDependency
Overrides ContextInterface::addCacheableDependency
1 call to Context::addCacheableDependency()
- Context::setContextValue in core/
lib/ Drupal/ Core/ Plugin/ Context/ Context.php - Sets the context value.
File
-
core/
lib/ Drupal/ Core/ Plugin/ Context/ Context.php, line 145
Class
- Context
- A Drupal specific context wrapper class.
Namespace
Drupal\Core\Plugin\ContextCode
public function addCacheableDependency($dependency) {
$this->cacheabilityMetadata = $this->cacheabilityMetadata
->merge(CacheableMetadata::createFromObject($dependency));
return $this;
}