public function PartyDefaultDataSet::hook_party_delete in Party 8.2
Same name and namespace in other branches
- 7 includes/party.data.inc \PartyDefaultDataSet::hook_party_delete()
Acts when a party is deleted.
1 method overrides PartyDefaultDataSet::hook_party_delete()
- PartyUserDataSet::hook_party_delete in modules/
party_user/ includes/ party_user.data.inc - Act on party delete.
File
- includes/
party.data.inc, line 68 - Provides the default class for managing party - Attached entity relationships.
Class
- PartyDefaultDataSet
- Class PartyDefaultDataSet
Code
public function hook_party_delete() {
foreach ($this
->getEntities() as $entity) {
$this
->detachEntity($entity);
$entity_type = $this
->getDataInfo('entity type');
entity_delete($entity_type, entity_id($entity_type, $entity));
}
$this
->save();
}