function entity_load_multiple_by_properties

Load entities by their property values.

Parameters

string $entity_type: The entity type to load, e.g. node or user.

array $values: An associative array where the keys are the property names and the values are the values those properties must have.

Return value

array An array of entity objects indexed by their ids.

36 calls to entity_load_multiple_by_properties()
BreadcrumbTest::testBreadCrumbs in drupal/core/modules/system/lib/Drupal/system/Tests/Menu/BreadcrumbTest.php
Tests breadcrumbs on node and administrative paths.
comment_user_cancel in drupal/core/modules/comment/comment.module
Implements hook_user_cancel().
EntityApiTest::testCRUD in drupal/core/modules/system/lib/Drupal/system/Tests/Entity/EntityApiTest.php
Tests basic CRUD functionality of the Entity API.
EntityFormTest::loadEntityByName in drupal/core/modules/system/lib/Drupal/system/Tests/Entity/EntityFormTest.php
Loads a test entity by name always resetting the storage controller cache.
EntityTranslationTest::testMultilingualProperties in drupal/core/modules/system/lib/Drupal/system/Tests/Entity/EntityTranslationTest.php
Tests multilingual properties.

... See full list

File

drupal/core/includes/entity.inc, line 214
Entity API for handling entities like nodes or users.

Code

function entity_load_multiple_by_properties($entity_type, array $values) {
  return entity_get_controller($entity_type)
    ->loadByProperties($values);
}