You are here

final public function PartyDefaultDataSet::detachEntity in Party 8.2

Same name and namespace in other branches
  1. 7 includes/party.data.inc \PartyDefaultDataSet::detachEntity()

Detach an entity

This is a helper method to detach an entity when you have it's object. This method cannot be overloaded and any extensions of this class can make use of PartyDefaultDataSet::preAttach() and PartyDefaultDataSet::postAttach() to perform any additional logic required.

Parameters

int $delta: The delta of the entity to detach

Return value

$this

See also

PartyDefaultDataSet::detchEntityByDelta()

PartyDefaultDataSet::preDetach()

PartyDefaultDataSet::postDetach()

2 calls to PartyDefaultDataSet::detachEntity()
PartyDefaultDataSet::hook_party_delete in includes/party.data.inc
Acts when a party is deleted.
PartyUserDataSet::hook_party_delete in modules/party_user/includes/party_user.data.inc
Act on party delete.

File

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

Class

PartyDefaultDataSet
Class PartyDefaultDataSet

Code

public final function detachEntity($entity) {

  // Figure out our delta
  $delta = $this
    ->getEntityDelta($entity);

  // Pass this onto the detachEntityByDelta method to actually detach
  $this
    ->detachEntityByDelta($delta);
  return $this;
}