You are here

function og_vocab_entity_delete in OG Vocabulary 7

Implements hook_entity_delete().

File

./og_vocab.module, line 1463
Give each group its own system controlled vocabularies.

Code

function og_vocab_entity_delete($entity, $entity_type) {
  if ($entity_type == 'taxonomy_vocabulary') {
    og_vocab_realtion_delete($entity_type, $entity->vid);
  }
  elseif (og_is_group($entity_type, $entity)) {
    list($id) = entity_extract_ids($entity_type, $entity);
    og_vocab_realtion_delete($entity_type, $id);
  }
}