class PartyUserDataSet in Party 8.2
Same name and namespace in other branches
- 7 modules/party_user/includes/party_user.data.inc \PartyUserDataSet
Controller class for CRM integration.
Hierarchy
- class \PartyDefaultDataSet
- class \PartyUserDataSet
Expanded class hierarchy of PartyUserDataSet
1 string reference to 'PartyUserDataSet'
- party_user_party_data_set_info in modules/
party_user/ party_user.module - Implements hook_party_data_set_info()
File
- modules/
party_user/ includes/ party_user.data.inc, line 10 - Provides the class for managing user data sets.
View source
class PartyUserDataSet extends PartyDefaultDataSet {
/**
* Get the user label.
*/
public function getLabel($delta) {
$entity = $this
->getEntity($delta);
return format_username($entity);
}
/**
* Act on party delete.
*/
public function hook_party_delete() {
foreach ($this
->getEntities() as $user) {
$this
->detachEntity($user);
$method = variable_get('party_user_party_delete_action', 'disallow');
if ($method != 'disallow') {
user_cancel(array(), $user->uid, $method);
}
}
$this
->save();
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PartyDefaultDataSet:: |
protected | property | var string $data_set The data set name (array key in hook_data_set_info) | |
PartyDefaultDataSet:: |
protected | property | var array $entities An array of attatched entities, keyed by delta. This can contain a mix of stub entities (with the is_stub property set to TRUE), fully loaded entities and unsaved entities (with the is_new property set to TRUE). | |
PartyDefaultDataSet:: |
protected | property | var party $party The party object we're connected to. | |
PartyDefaultDataSet:: |
private | property | var $saving A flag to indicate whether we're currently doing a controller save to prevent concurrency issues. | |
PartyDefaultDataSet:: |
final public | function | Attach an entity to the party | |
PartyDefaultDataSet:: |
public | function | Create a new entity | |
PartyDefaultDataSet:: |
final public | function | Detach an entity | |
PartyDefaultDataSet:: |
final public | function | Detatch an entity by delta | |
PartyDefaultDataSet:: |
public | function | Return the renderable array for one of our attached entities. | |
PartyDefaultDataSet:: |
public | function | Get actions for the attached entity. Check party access in each case. | |
PartyDefaultDataSet:: |
final public | function | Get information from the data set or entity definition. | |
PartyDefaultDataSet:: |
public | function | Get all attached entities | |
PartyDefaultDataSet:: |
public | function | Get a particular attached entity | |
PartyDefaultDataSet:: |
public | function | Get the delta from an entity object. | |
PartyDefaultDataSet:: |
public | function | Get entity ids/deltas | |
PartyDefaultDataSet:: |
public | function | Method to return the party object | |
PartyDefaultDataSet:: |
static | function | Alters entity info for entities requesting CRM integration. | |
PartyDefaultDataSet:: |
public | function | Load the full entities. | |
PartyDefaultDataSet:: |
protected | function | Overload any post attach logic | |
PartyDefaultDataSet:: |
protected | function | Overload any post detach logic | |
PartyDefaultDataSet:: |
protected | function | Overload any post save logic | |
PartyDefaultDataSet:: |
protected | function | Overload any pre attach logic | |
PartyDefaultDataSet:: |
protected | function | Overload any pre detach logic | |
PartyDefaultDataSet:: |
protected | function | Overload any pre save logic | |
PartyDefaultDataSet:: |
final public | function | Re-order attached entities | |
PartyDefaultDataSet:: |
final public | function | Save the attached entities information | |
PartyDefaultDataSet:: |
public | function | Save an entity. | |
PartyDefaultDataSet:: |
final public | function | Shift a particular entity in the order | |
PartyDefaultDataSet:: |
public | function | Constructor | |
PartyUserDataSet:: |
public | function |
Get the user label. Overrides PartyDefaultDataSet:: |
|
PartyUserDataSet:: |
public | function |
Act on party delete. Overrides PartyDefaultDataSet:: |