W3cubDocs

/Drupal 8

public static function Entity::loadMultiple

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

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Entity!Entity.php/function/Entity::loadMultiple/8.1.x