function ContentEntityStorageBase::invokeStorageLoadHook
Same name in other branches
- 9 core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php \Drupal\Core\Entity\ContentEntityStorageBase::invokeStorageLoadHook()
- 8.9.x core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php \Drupal\Core\Entity\ContentEntityStorageBase::invokeStorageLoadHook()
- 11.x core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php \Drupal\Core\Entity\ContentEntityStorageBase::invokeStorageLoadHook()
Invokes hook_entity_storage_load().
Parameters
\Drupal\Core\Entity\ContentEntityInterface[] $entities: List of entities, keyed on the entity ID.
2 calls to ContentEntityStorageBase::invokeStorageLoadHook()
- ContentEntityStorageBase::loadMultipleRevisions in core/
lib/ Drupal/ Core/ Entity/ ContentEntityStorageBase.php - Loads multiple entity revisions.
- SqlContentEntityStorage::doLoadMultiple in core/
lib/ Drupal/ Core/ Entity/ Sql/ SqlContentEntityStorage.php - Performs storage-specific loading of entities.
File
-
core/
lib/ Drupal/ Core/ Entity/ ContentEntityStorageBase.php, line 861
Class
- ContentEntityStorageBase
- Base class for content entity storage handlers.
Namespace
Drupal\Core\EntityCode
protected function invokeStorageLoadHook(array &$entities) {
if (!empty($entities)) {
// Call hook_entity_storage_load().
$this->moduleHandler()
->invokeAllWith('entity_storage_load', function (callable $hook, string $module) use (&$entities) {
$hook($entities, $this->entityTypeId);
});
// Call hook_TYPE_storage_load().
$this->moduleHandler()
->invokeAllWith($this->entityTypeId . '_storage_load', function (callable $hook, string $module) use (&$entities) {
$hook($entities);
});
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.