function entity_revision_load

Loads an entity from the database.

Parameters

string $entity_type: The entity type to load, e.g. node or user.

int $revision_id: The id of the entity to load.

Return value

Drupal\Core\Entity\EntityInterface The entity object, or FALSE if there is no entity with the given revision id.

See also

\Drupal\Core\Entity\EntityManager

Drupal\Core\Entity\EntityStorageControllerInterface

Drupal\Core\Entity\DatabaseStorageController

3 calls to entity_revision_load()
EntityRevisionsTest::testRevisions in drupal/core/modules/system/lib/Drupal/system/Tests/Entity/EntityRevisionsTest.php
Check node revision related operations.
node_revision_load in drupal/core/modules/node/node.module
Loads a node revision from the database.
Sql::load_entities in drupal/core/modules/views/lib/Drupal/views/Plugin/views/query/Sql.php
Loads all entities contained in the passed-in $results. . If the entity belongs to the base table, then it gets stored in $result->_entity. Otherwise, it gets stored in $result->_relationship_entities[$relationship_id];

File

drupal/core/includes/entity.inc, line 111
Entity API for handling entities like nodes or users.

Code

function entity_revision_load($entity_type, $revision_id) {
  return entity_get_controller($entity_type)
    ->loadRevision($revision_id);
}