You are here

function file_entity_file_type in File Entity (fieldable files) 7.3

Same name and namespace in other branches
  1. 8.2 file_entity.file.inc \file_entity_file_type()
  2. 7.2 file_entity.file.inc \file_entity_file_type()

Implements hook_file_type().

File

./file_entity.file.inc, line 42
File hooks implemented by the File entity module.

Code

function file_entity_file_type($file) {
  $types = array();
  foreach (file_type_get_enabled_types() as $type) {
    if (file_entity_match_mimetypes($type->mimetypes, $file->filemime)) {
      $types[] = $type->type;
    }
  }
  return $types;
}