public function Entity::identifier

cis7 entity.inc public Entity::identifier()
cle7 entity.inc public Entity::identifier()
elmsmedia7 entity.inc public Entity::identifier()
icor7 entity.inc public Entity::identifier()
meedjum_blog7 entity.inc public Entity::identifier()
mooc7 entity.inc public Entity::identifier()

Returns the entity identifier, i.e. the entities name or numeric id.

Return value

The identifier of the entity. If the entity type makes use of a name key, the name is returned, else the numeric id.

See also

entity_id()

4 calls to Entity::identifier()
Entity::defaultUri in sites/all/modules/ulmus/entity/includes/entity.inc
Override this in order to implement a custom default URI and specify 'entity_class_uri' as 'uri callback' hook_entity_info().
Entity::delete in sites/all/modules/ulmus/entity/includes/entity.inc
Permanently deletes the entity.
Entity::getTranslation in sites/all/modules/ulmus/entity/includes/entity.inc
Gets the raw, translated value of a property or field.
EntityClass::defaultURI in sites/all/modules/ulmus/entity/tests/entity_test.module
Specifies the default uri, which is picked up by uri() by default.

File

sites/all/modules/ulmus/entity/includes/entity.inc, line 83
Provides a base class for entities.

Class

Entity
A common class for entities.

Code

public function identifier() {
  return isset($this->{$this->nameKey}) ? $this->{$this->nameKey} : NULL;
}