diff --git a/includes/common.inc b/includes/common.inc index 861bdf938c37aa4660d6212dfb1b646e3cbcdf7b..ce0efcf4f180d0ccd0b7b97365722dc12267bd23 100644 --- a/includes/common.inc +++ b/includes/common.inc @@ -7271,18 +7271,24 @@ function entity_create_stub_entity($entity_type, $ids) { * @see hook_entity_info() * @see DrupalEntityControllerInterface * @see DrupalDefaultEntityController + * @see EntityFieldQuery * * @param $entity_type * The entity type to load, e.g. node or user. * @param $ids * An array of entity IDs, or FALSE to load all entities. * @param $conditions - * An array of conditions in the form 'field' => $value. + * (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. * @param $reset * Whether to reset the internal cache for the requested entity type. * * @return * An array of entity objects indexed by their ids. + * + * @todo Remove $conditions in Drupal 8. */ function entity_load($entity_type, $ids = FALSE, $conditions = array(), $reset = FALSE) { if ($reset) { diff --git a/includes/file.inc b/includes/file.inc index a685bdf3208756dde0307ecb04a32f1e275918a9..742c20e72fba5cfa76fc3614fca7465028617a65 100644 --- a/includes/file.inc +++ b/includes/file.inc @@ -519,15 +519,21 @@ function file_create_htaccess($directory, $private = TRUE) { * @param $fids * An array of file IDs. * @param $conditions - * An array of conditions to match against the {file_managed} table. - * These should be supplied in the form array('field_name' => - * 'field_value'). + * (deprecated) An associative array of conditions on the {file_managed} + * 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. * * @return * An array of file objects, indexed by fid. * * @see hook_file_load() * @see file_load() + * @see entity_load() + * @see EntityFieldQuery + * + * @todo Remove $conditions in Drupal 8. */ function file_load_multiple($fids = array(), $conditions = array()) { return entity_load('file', $fids, $conditions); diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 2e9b86ade55330d1f8e0923bee6f6ce46c99e4a4..f5d9f0f5e36066efb2dbd323a8e300b77e3d6906 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -1623,10 +1623,19 @@ function comment_delete_multiple($cids) { * @param $cids * An array of comment IDs. * @param $conditions - * An array of conditions to match against the {comments} table. These - * should be supplied in the form array('field_name' => 'field_value'). + * (deprecated) An associative array of conditions on the {comments} + * 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. + * * @return - * An array of comment objects, indexed by comment ID. + * An array of comment objects, indexed by comment ID. + * + * @see entity_load() + * @see EntityFieldQuery + * + * @todo Remove $conditions in Drupal 8. */ function comment_load_multiple($cids = array(), $conditions = array()) { return entity_load('comment', $cids, $conditions); diff --git a/modules/node/node.module b/modules/node/node.module index 154119d6ab51832cdd900c8b4325128313700e31..22946da2efd386306a226ecea48745d895199feb 100644 --- a/modules/node/node.module +++ b/modules/node/node.module @@ -875,16 +875,23 @@ function node_invoke($node, $hook, $a2 = NULL, $a3 = NULL, $a4 = NULL) { * database access if loaded again during the same page request. * * @see entity_load() + * @see EntityFieldQuery * * @param $nids * An array of node IDs. * @param $conditions - * An array of conditions on the {node} table in the form 'field' => $value. + * (deprecated) An associative array of conditions on the {node} + * 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. * @param $reset * Whether to reset the internal node_load cache. * * @return * An array of node objects indexed by nid. + * + * @todo Remove $conditions in Drupal 8. */ function node_load_multiple($nids = array(), $conditions = array(), $reset = FALSE) { return entity_load('node', $nids, $conditions, $reset); diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module index edfa7d42f8ad110068a524f9ad49fafd56656213..e2e99a9837e5d933263e4c331fad14e44279cd4a 100644 --- a/modules/taxonomy/taxonomy.module +++ b/modules/taxonomy/taxonomy.module @@ -1064,14 +1064,21 @@ protected function buildQuery($ids, $conditions = array(), $revision_id = FALSE) * database access if loaded again during the same page request. * * @see entity_load() + * @see EntityFieldQuery * * @param $tids - * An array of taxonomy term IDs. + * An array of taxonomy term IDs. * @param $conditions - * An array of conditions to add to the query. + * (deprecated) An associative array of conditions on the {taxonomy_term} + * 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. * * @return - * An array of term objects, indexed by tid. + * An array of term objects, indexed by tid. + * + * @todo Remove $conditions in Drupal 8. */ function taxonomy_term_load_multiple($tids = array(), $conditions = array()) { return entity_load('taxonomy_term', $tids, $conditions); diff --git a/modules/user/user.module b/modules/user/user.module index 8592e0155b39236be4db2a541d837e119bbae32f..7547f3f98a2eb9750ef24c1905b54e6e41b9e58a 100644 --- a/modules/user/user.module +++ b/modules/user/user.module @@ -235,11 +235,15 @@ function user_external_load($authname) { * @param $uids * An array of user IDs. * @param $conditions - * An array of conditions to match against the {users} table. These - * should be supplied in the form array('field_name' => 'field_value'). + * (deprecated) An associative array of conditions on the {users} + * 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. * @param $reset * A boolean indicating that the internal cache should be reset. Use this if * loading a user object which has been altered during the page request. + * * @return * An array of user objects, indexed by uid. * @@ -247,6 +251,9 @@ function user_external_load($authname) { * @see user_load() * @see user_load_by_mail() * @see user_load_by_name() + * @see EntityFieldQuery + * + * @todo Remove $conditions in Drupal 8. */ function user_load_multiple($uids = array(), $conditions = array(), $reset = FALSE) { return entity_load('user', $uids, $conditions, $reset);