8.3.x Entity.php public static Entity::loadMultiple(array $ids = NULL)
8.0.x Entity.php public static Entity::loadMultiple(array $ids = NULL)
8.1.x Entity.php public static Entity::loadMultiple(array $ids = NULL)
8.2.x Entity.php public static Entity::loadMultiple(array $ids = NULL)
8.4.x Entity.php public static Entity::loadMultiple(array $ids = NULL)

Loads one or more entities.

Parameters

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

Return value

static[] An array of entity objects indexed by their IDs.

Overrides EntityInterface::loadMultiple

File

core/lib/Drupal/Core/Entity/Entity.php, line 505

Class

Entity
Defines a base entity class.

Namespace

Drupal\Core\Entity

Code

public static function loadMultiple(array $ids = NULL) {
  $entity_manager = \Drupal::entityManager();
  return $entity_manager->getStorage($entity_manager->getEntityTypeFromClass(get_called_class()))->loadMultiple($ids);
}