You are here

class Party in Party 8.2

Same name in this branch
  1. 8.2 includes/party.entity.inc \Party
  2. 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

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

... See full list

File

lib/Drupal/party/Plugin/Core/Entity/Party.php, line 42
Definition of Drupal\party\Plugin\Core\Entity\Party.

Namespace

Drupal\party\Plugin\Core\Entity
View 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

Namesort descending Modifiers Type Description Overrides
CacheableDependencyTrait::$cacheContexts protected property Cache contexts.
CacheableDependencyTrait::$cacheMaxAge protected property Cache max-age.
CacheableDependencyTrait::$cacheTags protected property Cache tags.
CacheableDependencyTrait::setCacheability protected function Sets cacheability; useful for value object constructors.
DependencySerializationTrait::$_entityStorages protected property An array of entity type IDs keyed by the property name of their storages.
DependencySerializationTrait::$_serviceIds protected property An array of service IDs keyed by property name used for serialization.
DependencySerializationTrait::__sleep public function Aliased as: traitSleep 1
DependencySerializationTrait::__wakeup public function 2
EntityBase::$enforceIsNew protected property Boolean indicating whether the entity should be forced to be new.
EntityBase::$entityTypeId protected property The entity type.
EntityBase::$typedData protected property A typed data object wrapping this entity.
EntityBase::access public function Checks data value access. Overrides AccessibleInterface::access 1
EntityBase::bundle public function Gets the bundle of the entity. Overrides EntityInterface::bundle 1
EntityBase::create public static function Constructs a new entity object, without permanently saving it. Overrides EntityInterface::create
EntityBase::createDuplicate public function Creates a duplicate of the entity. Overrides EntityInterface::createDuplicate 2
EntityBase::delete public function Deletes an entity permanently. Overrides EntityInterface::delete 2
EntityBase::enforceIsNew public function Enforces an entity to be new. Overrides EntityInterface::enforceIsNew
EntityBase::entityManager Deprecated protected function Gets the entity manager.
EntityBase::entityTypeBundleInfo protected function Gets the entity type bundle info service.
EntityBase::entityTypeManager protected function Gets the entity type manager.
EntityBase::getCacheContexts public function The cache contexts associated with this object. Overrides CacheableDependencyTrait::getCacheContexts
EntityBase::getCacheMaxAge public function The maximum age for which this object may be cached. Overrides CacheableDependencyTrait::getCacheMaxAge
EntityBase::getCacheTags public function The cache tags associated with this object. Overrides CacheableDependencyTrait::getCacheTags
EntityBase::getCacheTagsToInvalidate public function Returns the cache tags that should be used to invalidate caches. Overrides EntityInterface::getCacheTagsToInvalidate 2
EntityBase::getConfigDependencyKey public function Gets the key that is used to store configuration dependencies. Overrides EntityInterface::getConfigDependencyKey
EntityBase::getConfigDependencyName public function Gets the configuration dependency name. Overrides EntityInterface::getConfigDependencyName 1
EntityBase::getConfigTarget public function Gets the configuration target identifier for the entity. Overrides EntityInterface::getConfigTarget 1
EntityBase::getEntityType public function Gets the entity type definition. Overrides EntityInterface::getEntityType
EntityBase::getEntityTypeId public function Gets the ID of the type of the entity. Overrides EntityInterface::getEntityTypeId
EntityBase::getListCacheTagsToInvalidate protected function The list cache tags to invalidate for this entity.
EntityBase::getOriginalId public function Gets the original ID. Overrides EntityInterface::getOriginalId 1
EntityBase::getTypedData public function Gets a typed data object for this entity object. Overrides EntityInterface::getTypedData
EntityBase::hasLinkTemplate public function Indicates if a link template exists for a given key. Overrides EntityInterface::hasLinkTemplate
EntityBase::invalidateTagsOnDelete protected static function Invalidates an entity's cache tags upon delete. 1
EntityBase::invalidateTagsOnSave protected function Invalidates an entity's cache tags upon save. 1
EntityBase::isNew public function Determines whether the entity is new. Overrides EntityInterface::isNew 2
EntityBase::label public function Gets the label of the entity. Overrides EntityInterface::label 6
EntityBase::language public function Gets the language of the entity. Overrides EntityInterface::language 1
EntityBase::languageManager protected function Gets the language manager.
EntityBase::link public function Deprecated way of generating a link to the entity. See toLink(). Overrides EntityInterface::link 1
EntityBase::linkTemplates protected function Gets an array link templates. 1
EntityBase::load public static function Loads an entity. Overrides EntityInterface::load
EntityBase::loadMultiple public static function Loads one or more entities. Overrides EntityInterface::loadMultiple
EntityBase::postCreate public function Acts on a created entity before hooks are invoked. Overrides EntityInterface::postCreate 4
EntityBase::postDelete public static function Acts on deleted entities before the delete hook is invoked. Overrides EntityInterface::postDelete 16
EntityBase::postLoad public static function Acts on loaded entities. Overrides EntityInterface::postLoad 2
EntityBase::postSave public function Acts on a saved entity before the insert or update hook is invoked. Overrides EntityInterface::postSave 14
EntityBase::preCreate public static function Changes the values of an entity before it is created. Overrides EntityInterface::preCreate 5
EntityBase::preDelete public static function Acts on entities before they are deleted and before hooks are invoked. Overrides EntityInterface::preDelete 4
EntityBase::preSave public function Acts on an entity before the presave hook is invoked. Overrides EntityInterface::preSave 2
EntityBase::referencedEntities public function Gets a list of entities referenced by this entity. Overrides EntityInterface::referencedEntities 1
EntityBase::save public function Saves an entity permanently. Overrides EntityInterface::save 3
EntityBase::setOriginalId public function Sets the original ID. Overrides EntityInterface::setOriginalId 1
EntityBase::toArray public function Gets an array of all property values. Overrides EntityInterface::toArray 2
EntityBase::toLink public function Generates the HTML for a link to this entity. Overrides EntityInterface::toLink
EntityBase::toUrl public function Gets the URL object for the entity. Overrides EntityInterface::toUrl 2
EntityBase::uriRelationships public function Gets a list of URI relationships supported by this entity. Overrides EntityInterface::uriRelationships
EntityBase::url public function Gets the public URL for this entity. Overrides EntityInterface::url 2
EntityBase::urlInfo public function Gets the URL object for the entity. Overrides EntityInterface::urlInfo 1
EntityBase::urlRouteParameters protected function Gets an array of placeholders for this entity. 2
EntityBase::uuid public function Gets the entity UUID (Universally Unique Identifier). Overrides EntityInterface::uuid 1
EntityBase::uuidGenerator protected function Gets the UUID generator.
EntityBase::__construct public function Constructs an Entity object. 2
EntityBase::__sleep public function 2
Party::$label public property The label of the party.
Party::$mail public property The party's email address.
Party::$pid public property The party ID.
Party::$uid public property The uid of the User the party is mocking up.
Party::$uuid public property The party UUID.
Party::id public function Implements Drupal\Core\Entity\EntityInterface::id() Overrides EntityBase::id
RefinableCacheableDependencyTrait::addCacheableDependency public function 1
RefinableCacheableDependencyTrait::addCacheContexts public function
RefinableCacheableDependencyTrait::addCacheTags public function
RefinableCacheableDependencyTrait::mergeCacheMaxAge public function