function SqlContentEntityStorage::doLoadMultipleRevisionsFieldItems
Same name in other branches
- 9 core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php \Drupal\Core\Entity\Sql\SqlContentEntityStorage::doLoadMultipleRevisionsFieldItems()
- 10 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
1 call to SqlContentEntityStorage::doLoadMultipleRevisionsFieldItems()
- SqlContentEntityStorage::doLoadRevisionFieldItems in core/
lib/ Drupal/ Core/ Entity/ Sql/ SqlContentEntityStorage.php - Actually loads revision field item values from the storage.
File
-
core/
lib/ Drupal/ Core/ Entity/ Sql/ SqlContentEntityStorage.php, line 645
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.