You are here

public function ContentEntityStorageBase::loadRevision in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php \Drupal\Core\Entity\ContentEntityStorageBase::loadRevision()

Load a specific entity revision.

Parameters

int|string $revision_id: The revision id.

Return value

\Drupal\Core\Entity\EntityInterface|null The specified entity revision or NULL if not found.

Overrides EntityStorageInterface::loadRevision

1 call to ContentEntityStorageBase::loadRevision()
ContentEntityStorageBase::deleteRevision in core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php
Delete a specific entity revision.
1 method overrides ContentEntityStorageBase::loadRevision()
ContentEntityNullStorage::loadRevision in core/lib/Drupal/Core/Entity/ContentEntityNullStorage.php
Load a specific entity revision.

File

core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php, line 223
Contains \Drupal\Core\Entity\ContentEntityStorageBase.

Class

ContentEntityStorageBase
Base class for content entity storage handlers.

Namespace

Drupal\Core\Entity

Code

public function loadRevision($revision_id) {
  $revision = $this
    ->doLoadRevisionFieldItems($revision_id);
  if ($revision) {
    $entities = [
      $revision
        ->id() => $revision,
    ];
    $this
      ->invokeStorageLoadHook($entities);
    $this
      ->postLoad($entities);
  }
  return $revision;
}