You are here

function groupmenu_group_content_delete in Group Menu 8

Implements hook_ENTITY_TYPE_delete().

File

./groupmenu.module, line 310
Gives the ability to create and manage menus for groups.

Code

function groupmenu_group_content_delete(EntityInterface $entity) {
  if ($entity
    ->getContentPlugin()
    ->getPluginId() === 'group_menu:menu') {
    \Drupal::service('cache.groupmenu')
      ->invalidateAll();
  }
}