protected function SqlContentEntityStorage::doLoadMultipleRevisionsFieldItems in Drupal 8
Same name and namespace 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()
Actually loads revision field item values from the storage.
This method should always be overridden and not called either directly or from parent::doLoadMultipleRevisionsFieldItems. It will be marked abstract in drupal:9.0.0
@todo Remove this logic and make the method abstract in https://www.drupal.org/project/drupal/issues/3069696
Parameters
array $revision_ids: An array of revision identifiers.
Return value
\Drupal\Core\Entity\EntityInterface[] The specified entity revisions or an empty array if none are found.
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;
}