public function WeMegaMenuBlock::getCacheTags in Drupal Mega Menu 8
Same name and namespace in other branches
- 8.x src/Plugin/Block/WeMegaMenuBlock.php \Drupal\we_megamenu\Plugin\Block\WeMegaMenuBlock::getCacheTags()
The cache tags associated with this object.
When this object is modified, these cache tags will be invalidated.
Return value
string[] A set of cache tags.
Overrides ContextAwarePluginBase::getCacheTags
File
- src/
Plugin/ Block/ WeMegaMenuBlock.php, line 49
Class
- WeMegaMenuBlock
- Provides a 'Drupal 8 Mega Menu' Block.
Namespace
Drupal\we_megamenu\Plugin\BlockCode
public function getCacheTags() {
$menu_name = $this
->getDerivativeId();
$id_menu = 'config:system.menu.' . $menu_name;
$ids = [
$id_menu,
];
return Cache::mergeTags(parent::getCacheTags(), $ids);
}