function SqlContentEntityStorage::doLoadMultipleRevisionsFieldItems
Same name in other branches
- 9 core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::doLoadMultipleRevisionsFieldItems()
- 8.9.x core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::doLoadMultipleRevisionsFieldItems()
- 11.x core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::doLoadMultipleRevisionsFieldItems()
Overrides ContentEntityStorageBase::doLoadMultipleRevisionsFieldItems
File
-
core/
lib/ Drupal/ Core/ Entity/ Sql/ SqlContentEntityStorage.php, line 615
Class
- SqlContentEntityStorage
- A content entity database storage implementation.
Namespace
Drupal\Core\Entity\SqlCode
protected function doLoadMultipleRevisionsFieldItems($revision_ids) {
$revisions = [];
// Sanitize IDs. Before feeding ID array into buildQuery, check whether
// it is empty as this would load all entity revisions.
$revision_ids = $this->cleanIds($revision_ids, 'revision');
if (!empty($revision_ids)) {
// Build and execute the query.
$query_result = $this->buildQuery(NULL, $revision_ids)
->execute();
$records = $query_result->fetchAllAssoc($this->revisionKey);
// Map the loaded records into entity objects and according fields.
if ($records) {
$revisions = $this->mapFromStorageRecords($records, TRUE);
}
}
return $revisions;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.