1 file.module file_type_load($name)

Menu argument loader: Loads a file type by string.

Parameters

$name: The machine-readable name of a file type to load, where '_' is replaced with '-'.

Return value

stdClass|FALSE: A file type object or FALSE if $name does not exist.

File

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

Code

function file_type_load($name) {
  return file_type_get_type(strtr($name, array('-' => '_')));
}