function file_load_multiple

Loads file entities from the database.

Parameters

array $fids: (optional) An array of entity IDs. If omitted, all entities are loaded.

$reset: Whether to reset the internal file_load_multiple() cache.

Return value

array An array of file entities, indexed by fid.

See also

hook_file_load()

file_load()

entity_load()

Drupal\Core\Entity\Query\EntityQueryInterface

5 calls to file_load_multiple()
file_field_prepare_view in drupal/core/modules/file/file.field.inc
Implements hook_field_prepare_view().
file_load in drupal/core/modules/file/file.module
Loads a single file entity from the database.
file_managed_file_process in drupal/core/modules/file/file.module
Render API callback: Expands the managed_file element type.
LoadTest::testMultiple in drupal/core/modules/file/lib/Drupal/file/Tests/LoadTest.php
This will test loading file data from the database.
SaveUploadTest::testNormal in drupal/core/modules/file/lib/Drupal/file/Tests/SaveUploadTest.php
Test the file_save_upload() function.

File

drupal/core/modules/file/file.module, line 109
Defines a "managed_file" Form API field and a "file" field for Field module.

Code

function file_load_multiple(array $fids = NULL, $reset = FALSE) {
  return entity_load_multiple('file', $fids, $reset);
}