You are here

function group_content_menu_group_delete in Group Content Menu 8

Implements hook_ENTITY_TYPE_delete().

File

./group_content_menu.module, line 141
Provides a group content menu entity type.

Code

function group_content_menu_group_delete(EntityInterface $entity) {

  // Remove the group menu and recursively its links on group deletion.
  foreach (group_content_menu_get_menus_per_group($entity) as $group_content) {
    $group_content
      ->getEntity()
      ->delete();
  }
}