file_load_multiple

  1. drupal
    1. 7
Versions
7 file_load_multiple($fids = array(), $conditions = array())

Loads file objects from the database.

@todo Remove $conditions in Drupal 8.

Parameters

$fids An array of file IDs.

$conditions (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 value

An array of file objects, indexed by fid.

See also

hook_file_load()

file_load()

entity_load()

EntityFieldQuery

Related topics

▾ 10 functions call file_load_multiple()

file_copy in drupal/includes/file.inc
Copies a file to a new location and adds a file record to the database.
file_field_load in drupal/modules/file/file.field.inc
Implements hook_field_load().
file_file_download in drupal/modules/file/file.module
Implements hook_file_download().
file_load in drupal/includes/file.inc
Load a file object from the database.
file_move in drupal/includes/file.inc
Move a file to a new location and update the file's database entry.
file_save_data in drupal/includes/file.inc
Save a string to the specified destination and create a database file entry.
file_save_upload in drupal/includes/file.inc
Saves a file upload to a new location.
image_file_download in drupal/modules/image/image.module
Implements hook_file_download().
UserController::attachLoad in drupal/modules/user/user.module
Attaches data to entities upon loading. This will attach fields, if the entity is fieldable. It calls hook_entity_load() for modules which need to add data to all entities. It also calls hook_TYPE_load() on the loaded entities. For…
user_update_7012 in drupal/modules/user/user.install
Add the user's pictures to the {file_managed} table and make them managed files.

Code

drupal/includes/file.inc, line 537

<?php
function file_load_multiple($fids = array(), $conditions = array()) {
  return entity_load('file', $fids, $conditions);
}
?>