protected function Entity::setUp in Entity API 7
Set up the object instance on construction or unserializiation.
2 calls to Entity::setUp()
- Entity::__construct in includes/
entity.inc - Entity::__wakeup in includes/
entity.inc - Magic method to invoke setUp() on unserialization.
File
- includes/
entity.inc, line 217 - Provides a base class for entities.
Class
- Entity
- A common class for entities.
Code
protected function setUp() {
$this->entityInfo = entity_get_info($this->entityType);
$this->idKey = $this->entityInfo['entity keys']['id'];
$this->nameKey = isset($this->entityInfo['entity keys']['name']) ? $this->entityInfo['entity keys']['name'] : $this->idKey;
$this->statusKey = empty($this->entityInfo['entity keys']['status']) ? 'status' : $this->entityInfo['entity keys']['status'];
}