function hook_file_default_types in File Entity (fieldable files) 7.3
Same name and namespace in other branches
- 7.2 file_entity.api.php \hook_file_default_types()
Define default file types.
File types are implemented as CTools exportables, so modules can alter the defaults via hook_file_default_types_alter(), and the administrator can save overridden and custom types to the {file_type} database table.
Return value
array An array whose keys are file type names and whose values are objects representing the file type, with the following key/value pairs:
- api_version: The version of this data.
- type: The file type name.
- label: The human-readable name of the file type.
- description: The description of this file type.
- mimetypes: An array of mimetypes that this file type will map to.
1 function implements hook_file_default_types()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- file_entity_file_default_types in ./
file_entity.module - End of "defgroup file_entity_access".
File
- ./
file_entity.api.php, line 36 - Hooks provided by the File Entity module.
Code
function hook_file_default_types() {
return array(
'image' => (object) array(
'api_version' => 1,
'type' => 'image',
'label' => t('Image'),
'description' => t("An <em>Image</em> is a two-dimensional picture that has a similar appearance to some subject, usually a physical object or a person."),
'mimetypes' => array(
'image/*',
),
),
);
}