You are here

protected function ContentEntityStorageBase::invokeStorageLoadHook in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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::loadRevision in core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php
Load a specific entity revision.
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 388
Contains \Drupal\Core\Entity\ContentEntityStorageBase.

Class

ContentEntityStorageBase
Base class for content entity storage handlers.

Namespace

Drupal\Core\Entity

Code

protected function invokeStorageLoadHook(array &$entities) {
  if (!empty($entities)) {

    // Call hook_entity_storage_load().
    foreach ($this
      ->moduleHandler()
      ->getImplementations('entity_storage_load') as $module) {
      $function = $module . '_entity_storage_load';
      $function($entities, $this->entityTypeId);
    }

    // Call hook_TYPE_storage_load().
    foreach ($this
      ->moduleHandler()
      ->getImplementations($this->entityTypeId . '_storage_load') as $module) {
      $function = $module . '_' . $this->entityTypeId . '_storage_load';
      $function($entities);
    }
  }
}