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
Same name and namespace in other branches
  1. 7 includes/party.entity.inc \Party

The class used for party entities.

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

includes/party.entity.inc, line 174
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 representing whether this party has been merged into another
   * party.
   *
   * @var integer
   */
  public $merged;

  /**
   * 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,
    );
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Party::$data_set_controllers public property A cache of data set controllers.
Party::$email public property The primary email for this party.
Party::$label public property The human-readable label for the party.
Party::$merged public property Boolean representing whether this party has been merged into another party.
Party::$merged_party public property If $merged is TRUE, this is the pid of the party that this party has been merged into.
Party::$pid public property The internal, numeric party-id.
Party::defaultLabel protected function Return the default label for this party object.
Party::defaultUri protected function Return the default path for this party.
Party::__construct public function