public function FlippyBlock::getCacheTags in Flippy 8
Implements \Drupal\Core\Entity\Entity::getCacheTags().
Overrides ContextAwarePluginBase::getCacheTags
File
- src/
Plugin/ Block/ FlippyBlock.php, line 126
Class
- FlippyBlock
- Provides a "Flippy" block.
Namespace
Drupal\flippy\Plugin\BlockCode
public function getCacheTags() {
if ($node = $this->routeMatch
->getParameter('node')) {
$cache_tags = Cache::mergeTags($node
->getCacheTags(), [
'node_list',
]);
return Cache::mergeTags(parent::getCacheTags(), $cache_tags);
}
else {
return parent::getCacheTags();
}
}