public function TBMegaMenuBlock::getCacheTags in The Better Mega Menu 2.x
Same name and namespace in other branches
- 8 src/Plugin/Block/TBMegaMenuBlock.php \Drupal\tb_megamenu\Plugin\Block\TBMegaMenuBlock::getCacheTags()
Overrides ContextAwarePluginTrait::getCacheTags
File
- src/
Plugin/ Block/ TBMegaMenuBlock.php, line 118
Class
- TBMegaMenuBlock
- Provides blocks which belong to TB Mega Menu.
Namespace
Drupal\tb_megamenu\Plugin\BlockCode
public function getCacheTags() {
// Rebuild block when menu or config changes.
$configName = "{$this->getDerivativeId()}__{$this->getThemeName()}";
$cacheTags = parent::getCacheTags();
$cacheTags[] = 'config:system.menu.' . $this
->getDerivativeId();
$cacheTags[] = 'config:tb_megamenu.menu_config.' . $configName;
return $cacheTags;
}