function entity_load

cis7 entity_load($entity_type, $ids = FALSE, $conditions = array(), $reset = FALSE)
cle7 entity_load($entity_type, $ids = FALSE, $conditions = array(), $reset = FALSE)
elmsmedia7 entity_load($entity_type, $ids = FALSE, $conditions = array(), $reset = FALSE)
icor7 entity_load($entity_type, $ids = FALSE, $conditions = array(), $reset = FALSE)
meedjum_blog7 entity_load($entity_type, $ids = FALSE, $conditions = array(), $reset = FALSE)
mooc7 entity_load($entity_type, $ids = FALSE, $conditions = array(), $reset = FALSE)

Load entities from the database.

The entities are stored in a static memory cache, and will not require database access if loaded again during the same page request.

The actual loading is done through a class that has to implement the DrupalEntityControllerInterface interface. By default, DrupalDefaultEntityController is used. Entity types can specify that a different class should be used by setting the 'controller class' key in hook_entity_info(). These classes can either implement the DrupalEntityControllerInterface interface, or, most commonly, extend the DrupalDefaultEntityController class. See node_entity_info() and the NodeController in node.module as an example.

@todo Remove $conditions in Drupal 8.


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

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

$conditions: (deprecated) An associative array of conditions on the base table, where the keys are the database fields and the values are the values those fields must have. Instead, it is preferable to use EntityFieldQuery to retrieve a list of entity IDs loadable by this function.

$reset: Whether to reset the internal cache for the requested entity type.

Return value

An array of entity objects indexed by their ids. When no results are found, an empty array is returned.

See also





102 calls to entity_load()
accessibility_test_load_multiple in sites/all/modules/ulmus/accessibility/accessibility.module
Loads multiple accessibility test entities.
cis_example_cis_form_alter in sites/all/modules/_my_modules/cis_examples/cis_example_cis/cis_example_cis.module
Implements hook_form_alter().
cis_example_cis_service_set_cis_service_data in sites/all/modules/_my_modules/cis_examples/cis_example_cis_service/cis_example_cis_service.module
Implements hook_set_cis_service_data().
cis_helper_cron in profiles/cis/modules/custom/cis_helper/cis_helper.module
Implements hook_cron().
cis_helper_offering_planning_page_submit in profiles/cis/modules/custom/cis_helper/
Submit handler for cis_helper_offering_planning_page.

... See full list

2 string references to 'entity_load'
DrupalDefaultEntityController::attachLoad in includes/
Attaches data to entities upon loading.
EntityAPIControllerExportable::attachLoad in sites/all/modules/ulmus/entity/includes/


includes/, line 7800
Common functions that many Drupal modules will need to reference.


function entity_load($entity_type, $ids = FALSE, $conditions = array(), $reset = FALSE) {
  if ($reset) {
  return entity_get_controller($entity_type)->load($ids, $conditions);



Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/ in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/
The website encountered an unexpected error. Please try again later.