You are here

public function ToolbarMenuElement::postSave in Toolbar Menu 8

Same name and namespace in other branches
  1. 8.2 src/Entity/ToolbarMenuElement.php \Drupal\toolbar_menu\Entity\ToolbarMenuElement::postSave()

Enforce 'toolbar_menu' cache tag invalidation to add this new toolbar_menu entry in the toolbar.

Overrides EntityBase::postSave

File

src/Entity/ToolbarMenuElement.php, line 50

Class

ToolbarMenuElement
Defines the Toolbar element entity.

Namespace

Drupal\toolbar_menu\Entity

Code

public function postSave(EntityStorageInterface $storage, $update = TRUE) {
  \Drupal::service('cache_tags.invalidator')
    ->invalidateTags([
    'toolbar_menu',
  ]);
}