function file_load_multiple in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/file/file.module \file_load_multiple()
Loads file entities from the database.
Parameters
array $fids: (optional) An array of entity IDs. If omitted, all entities are loaded.
bool $reset: Whether to reset the internal file_load_multiple() cache.
Return value
array An array of file entities, indexed by fid.
Deprecated
in Drupal 8.x, will be removed before Drupal 9.0. Use \Drupal\file\Entity\File::loadMultiple().
See also
\Drupal\Core\Entity\Query\EntityQueryInterface
File
- core/
modules/ file/ file.module, line 70 - Defines a "managed_file" Form API field and a "file" field for Field module.
Code
function file_load_multiple(array $fids = NULL, $reset = FALSE) {
if ($reset) {
\Drupal::entityManager()
->getStorage('file')
->resetCache($fids);
}
return File::loadMultiple($fids);
}