public function Entity::isDefaultRevision

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

Checks whether the entity is the default revision.

Return value

Boolean

See also

entity_revision_is_default()

1 call to Entity::isDefaultRevision()
FieldCollectionItemEntity::deleteRevision in sites/all/modules/ulmus/field_collection/field_collection.module
Intelligently delete a field collection item revision.

File

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

Class

Entity
A common class for entities.

Code

public function isDefaultRevision() {
  if (!empty($this->entityInfo['entity keys']['revision'])) {
    $key = !empty($this->entityInfo['entity keys']['default revision']) ? $this->entityInfo['entity keys']['default revision'] : 'default_revision';
    return !empty($this->$key);
  }
  return TRUE;
}