You are here

function load_files_by_filemime in Bynder 7

1 call to load_files_by_filemime()
sync_old_bynder_media in includes/bynder.utils.inc

File

includes/bynder.utils.inc, line 191
utility functions for the bynder module

Code

function load_files_by_filemime($filemime) {
  $query = db_select('file_managed', 'f')
    ->fields('f')
    ->condition('f.filemime', $filemime);

  // Load all file ids in an array.
  $fids = $query
    ->execute()
    ->fetchCol();

  // Return the file objects.
  return file_load_multiple($fids);
}