public function SocialSimpleBlock::getCacheTags in Social simple 2.0.x
Same name and namespace in other branches
- 8 src/Plugin/Block/SocialSimpleBlock.php \Drupal\social_simple\Plugin\Block\SocialSimpleBlock::getCacheTags()
Overrides ContextAwarePluginTrait::getCacheTags
File
- src/
Plugin/ Block/ SocialSimpleBlock.php, line 181
Class
- SocialSimpleBlock
- Provides a 'SocialSimpleBlock' block.
Namespace
Drupal\social_simple\Plugin\BlockCode
public function getCacheTags() {
/** @var \Drupal\node\NodeInterface $node */
if ($node = $this->currentRouteMatch
->getParameter('node')) {
return Cache::mergeTags(parent::getCacheTags(), $node
->getCacheTags());
}
elseif ($taxonomy_term = $this->currentRouteMatch
->getParameter('taxonomy_term')) {
return Cache::mergeTags(parent::getCacheTags(), $taxonomy_term
->getCacheTags());
}
else {
return parent::getCacheTags();
}
}