public function ArrayObject::addCacheContexts in Express 8
Adds cache contexts.
Parameters
string[] $cache_contexts: The cache contexts to be added.
Return value
$this
Overrides RefinableCacheableDependencyInterface::addCacheContexts
File
- themes/
contrib/ bootstrap/ src/ Utility/ ArrayObject.php, line 100 - Contains \Drupal\bootstrap\Utility\ArrayObject.
Class
- ArrayObject
- Custom ArrayObject implementation.
Namespace
Drupal\bootstrap\UtilityCode
public function addCacheContexts(array $cache_contexts) {
BubbleableMetadata::createFromRenderArray($this->array)
->addCacheContexts($cache_contexts)
->applyTo($this->array);
return $this;
}