class Party in Party 7
Same name and namespace in other branches
The class used for party entities.
Hierarchy
- class \Entity implements EntityInterface
- class \Party
Expanded class hierarchy of Party
26 string references to 'Party'
- attached_entity_from_party.inc in plugins/
relationships/ attached_entity_from_party.inc - Plugin to provide an relationship handler for term from node.
- PartyAccessTestCase::getInfo in tests/
party_access.test - PartyAcquisitionTestCase::getInfo in tests/
party_acquisition.test - PartyHatTestCase::getInfo in modules/
party_hat/ tests/ party_hat.test - PartyPrimaryFields::getDataSetInfo in includes/
party.primary_fields.inc - Get data set info including the spoofed party.
File
- includes/
party.entity.inc, line 252 - Contains the controller classes for Party entities.
View source
class Party extends Entity {
/**
* The internal, numeric party-id.
*
* @var integer
*/
public $pid;
/**
* The human-readable label for the party.
*
* @var string
*
* @see PartyController::setLabel()
*/
public $label;
/**
* Boolean indicating whether this party has been archived.
*
* Archiving parties provides a way to ignore parties from certain features
* or restrict access. An example of when you would archive a party is when
* the parties is deceased (in the case of a person) or no longer operates
* (in the case of an organisation).
*
* @var boolean
*/
public $archived;
/**
* Boolean indicating whether this party has been hidden.
*
* Hiding a party provides a way to remove a party from the system without
* deleting and losing the data. An example of when you would hide a party
* is on merging, where you would hide the party that is no longer used. This
* is then completely hidden from all normal system processes, but it still
* exists and can be loaded, for example to find out what party it has been
* merged with.
*
* @var boolean
*/
public $hidden;
/**
* If $merged is TRUE, this is the pid of the party that this party has been
* merged into.
*
* @var integer
*/
public $merged_party;
/**
* The primary email for this party.
*
* @var string
*/
public $email;
/**
* A cache of data set controllers.
*
* @var array
*/
public $data_set_controllers = array();
public function __construct($values = array()) {
parent::__construct($values, 'party');
}
/**
* Return the default label for this party object.
*
* @return string
* Human readable label for the party object.
*/
protected function defaultLabel() {
return $this->label;
}
/**
* Return the default path for this party.
*
* @return array
* An array with the following key:
* - path - the drupal path for the party.
*/
protected function defaultUri() {
return array(
'path' => 'party/' . $this->pid,
);
}
/**
* Get a data set controller.
*/
public function getDataSetController($data_set_name) {
return entity_get_controller('party')
->getDataSetController($this, $data_set_name);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Entity:: |
protected | property | 1 | |
Entity:: |
protected | property | ||
Entity:: |
protected | property | ||
Entity:: |
protected | property | ||
Entity:: |
protected | property | ||
Entity:: |
public | function |
Builds a structured array representing the entity's content. Overrides EntityInterface:: |
1 |
Entity:: |
public | function |
Returns the bundle of the entity. Overrides EntityInterface:: |
|
Entity:: |
public | function |
Permanently deletes the entity. Overrides EntityInterface:: |
|
Entity:: |
public | function |
Returns the info of the type of the entity. Overrides EntityInterface:: |
|
Entity:: |
public | function |
Returns the type of the entity. Overrides EntityInterface:: |
|
Entity:: |
public | function |
Exports the entity. Overrides EntityInterface:: |
|
Entity:: |
public | function |
Gets the raw, translated value of a property or field. Overrides EntityInterface:: |
|
Entity:: |
public | function |
Checks if the entity has a certain exportable status. Overrides EntityInterface:: |
|
Entity:: |
public | function |
Returns the entity identifier, i.e. the entities name or numeric id. Overrides EntityInterface:: |
|
Entity:: |
public | function |
Returns the internal, numeric identifier. Overrides EntityInterface:: |
|
Entity:: |
public | function |
Checks whether the entity is the default revision. Overrides EntityInterface:: |
|
Entity:: |
public | function |
Returns the label of the entity. Overrides EntityInterface:: |
|
Entity:: |
public | function |
Permanently saves the entity. Overrides EntityInterface:: |
|
Entity:: |
protected | function | Set up the object instance on construction or unserializiation. | |
Entity:: |
public | function |
Returns the uri of the entity just as entity_uri(). Overrides EntityInterface:: |
|
Entity:: |
public | function |
Generate an array for rendering the entity. Overrides EntityInterface:: |
|
Entity:: |
public | function |
Returns the EntityMetadataWrapper of the entity. Overrides EntityInterface:: |
|
Entity:: |
public | function | Magic method to only serialize what's necessary. | |
Entity:: |
public | function | Magic method to invoke setUp() on unserialization. | |
Party:: |
public | property | Boolean indicating whether this party has been archived. | |
Party:: |
public | property | A cache of data set controllers. | |
Party:: |
public | property | The primary email for this party. | |
Party:: |
public | property | Boolean indicating whether this party has been hidden. | |
Party:: |
public | property | The human-readable label for the party. | |
Party:: |
public | property | If $merged is TRUE, this is the pid of the party that this party has been merged into. | |
Party:: |
public | property | The internal, numeric party-id. | |
Party:: |
protected | function |
Return the default label for this party object. Overrides Entity:: |
|
Party:: |
protected | function |
Return the default path for this party. Overrides Entity:: |
|
Party:: |
public | function | Get a data set controller. | |
Party:: |
public | function |
Overrides Entity:: |