public function HorizontalMenu::getCacheTags in Responsive and off-canvas menu 8.3
Same name and namespace in other branches
- 8.2 src/Plugin/Block/HorizontalMenu.php \Drupal\responsive_menu\Plugin\Block\HorizontalMenu::getCacheTags()
- 4.4.x src/Plugin/Block/HorizontalMenu.php \Drupal\responsive_menu\Plugin\Block\HorizontalMenu::getCacheTags()
- 4.0.x src/Plugin/Block/HorizontalMenu.php \Drupal\responsive_menu\Plugin\Block\HorizontalMenu::getCacheTags()
- 4.1.x src/Plugin/Block/HorizontalMenu.php \Drupal\responsive_menu\Plugin\Block\HorizontalMenu::getCacheTags()
- 4.3.x src/Plugin/Block/HorizontalMenu.php \Drupal\responsive_menu\Plugin\Block\HorizontalMenu::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/ HorizontalMenu.php, line 154
Class
- HorizontalMenu
- Provides the HorizontalMenu block.
Namespace
Drupal\responsive_menu\Plugin\BlockCode
public function getCacheTags() {
// Even when the menu block renders to the empty string for a user, we want
// the cache tag for this menu to be set: whenever the menu is changed, this
// menu block must also be re-rendered for that user, because maybe a menu
// link that is accessible for that user has been added.
$cache_tags = parent::getCacheTags();
$cache_tags[] = 'config:block.block.horizontalmenu';
return $cache_tags;
}