function BlockContentBlock::getCacheContexts
Overrides ContextAwarePluginTrait::getCacheContexts
File
-
core/
modules/ block_content/ src/ Plugin/ Block/ BlockContentBlock.php, line 156
Class
- BlockContentBlock
- Defines a generic block type.
Namespace
Drupal\block_content\Plugin\BlockCode
public function getCacheContexts() {
$contexts = parent::getCacheContexts();
if (($entity = $this->getEntity()) && $entity instanceof BlockContentInterface) {
$contexts = Cache::mergeContexts($contexts, $entity->getCacheContexts());
}
return $contexts;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.