You are here

public function ContentEntityStorage::loadRevision in MongoDB 8

Load a specific entity revision.

Parameters

int $revision_id: The revision id.

Return value

\Drupal\Core\Entity\EntityInterface|false The specified entity revision or FALSE if not found.

Overrides ContentEntityStorageBase::loadRevision

File

src/Entity/ContentEntityStorage.php, line 69
Contains Drupal\mongodb\Entity\ContentEntityStorage.

Class

ContentEntityStorage

Namespace

Drupal\mongodb\Entity

Code

public function loadRevision($revision_id) {
  $revisions = $this
    ->loadFromMongo('entity_revision', [
    '_id' => (int) $revision_id,
  ]);
  return isset($revisions[$revision_id]) ? $revisions[$revision_id] : FALSE;
}