You are here

public function BundleEntityStorage::loadMultiple in Lightning Core 8.2

Same name and namespace in other branches
  1. 8.5 src/BundleEntityStorage.php \Drupal\lightning_core\BundleEntityStorage::loadMultiple()
  2. 8 src/BundleEntityStorage.php \Drupal\lightning_core\BundleEntityStorage::loadMultiple()
  3. 8.3 src/BundleEntityStorage.php \Drupal\lightning_core\BundleEntityStorage::loadMultiple()
  4. 8.4 src/BundleEntityStorage.php \Drupal\lightning_core\BundleEntityStorage::loadMultiple()

Loads one or more entities.

Parameters

$ids: An array of entity IDs, or NULL to load all entities.

Return value

\Drupal\Core\Entity\EntityInterface[] An array of entity objects indexed by their IDs. Returns an empty array if no matching entities are found.

Overrides EntityStorageBase::loadMultiple

File

src/BundleEntityStorage.php, line 57

Class

BundleEntityStorage
A storage handler for entity types that are bundles of other entity types.

Namespace

Drupal\lightning_core

Code

public function loadMultiple(array $ids = NULL, $check_access = FALSE) {
  if ($check_access) {
    $ids = array_filter($ids ?: $this
      ->getQuery()
      ->execute(), [
      $this->accessHandler,
      'createAccess',
    ]);
  }
  return parent::loadMultiple($ids);
}