Same name and namespace in other branches
- 8.9.x core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php \Drupal\Core\Entity\ContentEntityStorageBase::loadRevision()
- 9 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
Deprecated
in drupal:10.1.0 and is removed from drupal:11.0.0. Use \Drupal\Core\Entity\RevisionableStorageInterface::loadRevision instead.
See also
https://www.drupal.org/node/2926958
https://www.drupal.org/node/2927226
https://www.drupal.org/node/3294237
2 calls to ContentEntityStorageBase::loadRevision()
- ContentEntityStorageBase::deleteRevision in core/
lib/ Drupal/ Core/ Entity/ ContentEntityStorageBase.php - Delete a specific entity revision.
- SqlContentEntityStorage::saveToDedicatedTables in core/
lib/ Drupal/ Core/ Entity/ Sql/ SqlContentEntityStorage.php - Saves values of fields that use dedicated tables.
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 633
Class
- ContentEntityStorageBase
- Base class for content entity storage handlers.
Namespace
Drupal\Core\EntityCode
public function loadRevision($revision_id) {
$revisions = $this
->loadMultipleRevisions([
$revision_id,
]);
return $revisions[$revision_id] ?? NULL;
}