function ContentEntityStorageBase::loadRevisionUnchanged
File
-
core/
lib/ Drupal/ Core/ Entity/ ContentEntityStorageBase.php, line 780
Class
- ContentEntityStorageBase
- Base class for content entity storage handlers.
Namespace
Drupal\Core\EntityCode
public function loadRevisionUnchanged($revision_id) : ?EntityInterface {
// Load the revision by ignoring the static entity revision cache.
$revision_ids = [
$revision_id,
];
$revisions = $this->getFromPersistentRevisionCache($revision_ids);
if ($revisions) {
$revision = $revisions[$revision_id];
$entities = [
$revision->id() => $revision,
];
$this->postLoad($entities);
}
else {
$this->ignoreStaticRevisionCache = TRUE;
$revision = $this->loadRevision($revision_id);
$this->ignoreStaticRevisionCache = FALSE;
}
return $revision;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.