You are here

protected function EdgeEntityStorageBase::invokeStorageLoadHook in Apigee Edge 8

Invokes hook_entity_storage_load().

Parameters

\Drupal\Core\Entity\EntityInterface[] $entities: List of entities, keyed on the entity ID.

1 call to EdgeEntityStorageBase::invokeStorageLoadHook()
EdgeEntityStorageBase::processLoadedEntities in src/Entity/Storage/EdgeEntityStorageBase.php
Processes loaded (SDK) entities to Drupal entities.

File

src/Entity/Storage/EdgeEntityStorageBase.php, line 335

Class

EdgeEntityStorageBase
Base entity storage class for Apigee Edge entities.

Namespace

Drupal\apigee_edge\Entity\Storage

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);
    }
  }
}