You are here

function hook_group_uninstall in Group 7

Act upon uninstallation of the Group module.

This function differs from hook_modules_uninstalled() in a sense that it allows you to act upon the uninstallation of the Group module by using the group ids of all groups in your uninstallation logic. If you do not need such functionality, just use hook_modules_uninstalled() instead.

Parameters

array $gids: An array of group ids.

1 invocation of hook_group_uninstall()
group_uninstall in ./group.install
Implements hook_uninstall().

File

./group.api.php, line 23
Hooks provided by the Group module.

Code

function hook_group_uninstall(array $gids) {
  db_delete('my_entity_table')
    ->condition('my_entity_id_field', $gids, 'IN')
    ->execute();
}