class Party in Party 8.2
Same name in this branch
- 8.2 includes/party.entity.inc \Party
- 8.2 lib/Drupal/party/Plugin/Core/Entity/Party.php \Drupal\party\Plugin\Core\Entity\Party
Defines the Party class to extend users to work as an anonymous user API.
Plugin annotation
@EntityType(
id = "party",
label = @Translation("Party"),
module = "party",
controllers = {
"storage" = "Drupal\party\PartyStorageController",
"render" = "Drupal\Core\Entity\EntityRenderController",
"access" = "Drupal\Core\Entity\EntityAccessController",
"form" = {
"default" = "Drupal\Core\Entity\EntityFormController",
"edit" = "Drupal\Core\Entity\EntityFormController"
}
},
base_table = "party",
uri_callback = "party_uri",
label_callback = "party_label",
fieldable = TRUE,
entity_keys = {
"id" = "pid",
"label" = "label",
"uuid" = "uuid"
}
)
Hierarchy
- class \Drupal\Core\Entity\EntityBase implements EntityInterface uses RefinableCacheableDependencyTrait, DependencySerializationTrait
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.
- party.info.yml in ./
party.info.yml - party.info.yml
- PartyAccessTestCase::getInfo in tests/
party_access.test - PartyController::invoke in includes/
party.entity.inc - Implements EntityAPIControllerInterface.
- PartyHatTestCase::getInfo in modules/
party_hat/ tests/ party_hat.test
File
- lib/
Drupal/ party/ Plugin/ Core/ Entity/ Party.php, line 42 - Definition of Drupal\party\Plugin\Core\Entity\Party.
Namespace
Drupal\party\Plugin\Core\EntityView source
class Party extends Entity {
/**
* The party ID.
*
* @var integer
*/
public $pid;
/**
* The uid of the User the party is mocking up.
*
* @var integer
*/
public $uid;
/**
* The party UUID.
*
* @var string
*/
public $uuid;
/**
* The label of the party.
*
* @var string
*/
public $label = '';
/**
* The party's email address.
*
* @var string
*/
public $mail = '';
/**
* Implements Drupal\Core\Entity\EntityInterface::id()
*/
public function id() {
return $this->pid;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CacheableDependencyTrait:: |
protected | property | Cache contexts. | |
CacheableDependencyTrait:: |
protected | property | Cache max-age. | |
CacheableDependencyTrait:: |
protected | property | Cache tags. | |
CacheableDependencyTrait:: |
protected | function | Sets cacheability; useful for value object constructors. | |
DependencySerializationTrait:: |
protected | property | An array of entity type IDs keyed by the property name of their storages. | |
DependencySerializationTrait:: |
protected | property | An array of service IDs keyed by property name used for serialization. | |
DependencySerializationTrait:: |
public | function | Aliased as: traitSleep | 1 |
DependencySerializationTrait:: |
public | function | 2 | |
EntityBase:: |
protected | property | Boolean indicating whether the entity should be forced to be new. | |
EntityBase:: |
protected | property | The entity type. | |
EntityBase:: |
protected | property | A typed data object wrapping this entity. | |
EntityBase:: |
public | function |
Checks data value access. Overrides AccessibleInterface:: |
1 |
EntityBase:: |
public | function |
Gets the bundle of the entity. Overrides EntityInterface:: |
1 |
EntityBase:: |
public static | function |
Constructs a new entity object, without permanently saving it. Overrides EntityInterface:: |
|
EntityBase:: |
public | function |
Creates a duplicate of the entity. Overrides EntityInterface:: |
2 |
EntityBase:: |
public | function |
Deletes an entity permanently. Overrides EntityInterface:: |
2 |
EntityBase:: |
public | function |
Enforces an entity to be new. Overrides EntityInterface:: |
|
EntityBase:: |
protected | function | Gets the entity manager. | |
EntityBase:: |
protected | function | Gets the entity type bundle info service. | |
EntityBase:: |
protected | function | Gets the entity type manager. | |
EntityBase:: |
public | function |
The cache contexts associated with this object. Overrides CacheableDependencyTrait:: |
|
EntityBase:: |
public | function |
The maximum age for which this object may be cached. Overrides CacheableDependencyTrait:: |
|
EntityBase:: |
public | function |
The cache tags associated with this object. Overrides CacheableDependencyTrait:: |
|
EntityBase:: |
public | function |
Returns the cache tags that should be used to invalidate caches. Overrides EntityInterface:: |
2 |
EntityBase:: |
public | function |
Gets the key that is used to store configuration dependencies. Overrides EntityInterface:: |
|
EntityBase:: |
public | function |
Gets the configuration dependency name. Overrides EntityInterface:: |
1 |
EntityBase:: |
public | function |
Gets the configuration target identifier for the entity. Overrides EntityInterface:: |
1 |
EntityBase:: |
public | function |
Gets the entity type definition. Overrides EntityInterface:: |
|
EntityBase:: |
public | function |
Gets the ID of the type of the entity. Overrides EntityInterface:: |
|
EntityBase:: |
protected | function | The list cache tags to invalidate for this entity. | |
EntityBase:: |
public | function |
Gets the original ID. Overrides EntityInterface:: |
1 |
EntityBase:: |
public | function |
Gets a typed data object for this entity object. Overrides EntityInterface:: |
|
EntityBase:: |
public | function |
Indicates if a link template exists for a given key. Overrides EntityInterface:: |
|
EntityBase:: |
protected static | function | Invalidates an entity's cache tags upon delete. | 1 |
EntityBase:: |
protected | function | Invalidates an entity's cache tags upon save. | 1 |
EntityBase:: |
public | function |
Determines whether the entity is new. Overrides EntityInterface:: |
2 |
EntityBase:: |
public | function |
Gets the label of the entity. Overrides EntityInterface:: |
6 |
EntityBase:: |
public | function |
Gets the language of the entity. Overrides EntityInterface:: |
1 |
EntityBase:: |
protected | function | Gets the language manager. | |
EntityBase:: |
public | function |
Deprecated way of generating a link to the entity. See toLink(). Overrides EntityInterface:: |
1 |
EntityBase:: |
protected | function | Gets an array link templates. | 1 |
EntityBase:: |
public static | function |
Loads an entity. Overrides EntityInterface:: |
|
EntityBase:: |
public static | function |
Loads one or more entities. Overrides EntityInterface:: |
|
EntityBase:: |
public | function |
Acts on a created entity before hooks are invoked. Overrides EntityInterface:: |
4 |
EntityBase:: |
public static | function |
Acts on deleted entities before the delete hook is invoked. Overrides EntityInterface:: |
16 |
EntityBase:: |
public static | function |
Acts on loaded entities. Overrides EntityInterface:: |
2 |
EntityBase:: |
public | function |
Acts on a saved entity before the insert or update hook is invoked. Overrides EntityInterface:: |
14 |
EntityBase:: |
public static | function |
Changes the values of an entity before it is created. Overrides EntityInterface:: |
5 |
EntityBase:: |
public static | function |
Acts on entities before they are deleted and before hooks are invoked. Overrides EntityInterface:: |
4 |
EntityBase:: |
public | function |
Acts on an entity before the presave hook is invoked. Overrides EntityInterface:: |
2 |
EntityBase:: |
public | function |
Gets a list of entities referenced by this entity. Overrides EntityInterface:: |
1 |
EntityBase:: |
public | function |
Saves an entity permanently. Overrides EntityInterface:: |
3 |
EntityBase:: |
public | function |
Sets the original ID. Overrides EntityInterface:: |
1 |
EntityBase:: |
public | function |
Gets an array of all property values. Overrides EntityInterface:: |
2 |
EntityBase:: |
public | function |
Generates the HTML for a link to this entity. Overrides EntityInterface:: |
|
EntityBase:: |
public | function |
Gets the URL object for the entity. Overrides EntityInterface:: |
2 |
EntityBase:: |
public | function |
Gets a list of URI relationships supported by this entity. Overrides EntityInterface:: |
|
EntityBase:: |
public | function |
Gets the public URL for this entity. Overrides EntityInterface:: |
2 |
EntityBase:: |
public | function |
Gets the URL object for the entity. Overrides EntityInterface:: |
1 |
EntityBase:: |
protected | function | Gets an array of placeholders for this entity. | 2 |
EntityBase:: |
public | function |
Gets the entity UUID (Universally Unique Identifier). Overrides EntityInterface:: |
1 |
EntityBase:: |
protected | function | Gets the UUID generator. | |
EntityBase:: |
public | function | Constructs an Entity object. | 2 |
EntityBase:: |
public | function | 2 | |
Party:: |
public | property | The label of the party. | |
Party:: |
public | property | The party's email address. | |
Party:: |
public | property | The party ID. | |
Party:: |
public | property | The uid of the User the party is mocking up. | |
Party:: |
public | property | The party UUID. | |
Party:: |
public | function |
Implements Drupal\Core\Entity\EntityInterface::id() Overrides EntityBase:: |
|
RefinableCacheableDependencyTrait:: |
public | function | 1 | |
RefinableCacheableDependencyTrait:: |
public | function | ||
RefinableCacheableDependencyTrait:: |
public | function | ||
RefinableCacheableDependencyTrait:: |
public | function |