#920600 by bojanz, solotandem: Fixed Document the deprecated parameter in entity_load()

merge-requests/26/head
Angie Byron 2010-11-20 09:43:43 +00:00
parent d54e67002b
commit ed4b74024a
6 changed files with 55 additions and 13 deletions

View File

@ -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) {

View File

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

View File

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

View File

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

View File

@ -1064,14 +1064,21 @@ class TaxonomyVocabularyController extends DrupalDefaultEntityController {
* 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);

View File

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