public function OgVocab::delete in OG Vocabulary 7
Overrides Entity::delete().
Overrides Entity::delete
File
- includes/
og_vocab.og_vocab.inc, line 218 - A class used for messages.
Class
- OgVocab
- @file A class used for messages.
Code
public function delete() {
if (variable_get('og_use_queue', FALSE)) {
// Add item to the queue.
$group = og_vocab_relation_get($this->vid);
$data = array(
'vid' => $this->vid,
'entity_type' => $this->entity_type,
'bundle' => $this->bundle,
'field_name' => $this->field_name,
'group_type' => $group->group_type,
'gid' => $group->gid,
// The last processed OG-membership ID.
'last_id' => 0,
);
$queue = DrupalQueue::get('og_vocab');
$queue
->createItem($data);
}
// After defining the item data, if we used queue, delete the entity.
parent::delete();
}