You are here

protected function PartyDefaultDataSet::clear in Party 7

Clear the attached entities from the database.

This will remove all the attachments from the database. This is usually run at the start of the save() method however it is also called in the hook_party_delete() so it gets its own method call here.

3 calls to PartyDefaultDataSet::clear()
PartyDefaultDataSet::hook_party_delete in includes/party.data.inc
Acts when a party is deleted.
PartyDefaultDataSet::save in includes/party.data.inc
Save the attached entities information
PartyUserDataSet::hook_party_delete in modules/party_user/includes/party_user.data.inc
Act on party delete.

File

includes/party.data.inc, line 914
Provides the default class for managing party - Attached entity relationships.

Class

PartyDefaultDataSet
Class PartyDefaultDataSet

Code

protected function clear() {

  // Clear out our old bits
  $query = db_delete('party_attached_entity');
  $query
    ->condition('pid', $this->party->pid, '=');
  $query
    ->condition('data_set', $this->data_set);
  $query
    ->execute();
}