function file_entity_file_default_types in File Entity (fieldable files) 7.3
Same name and namespace in other branches
- 7.2 file_entity.module \file_entity_file_default_types()
End of "defgroup file_entity_access".
Implements hook_file_default_types().
Related topics
File
- ./
file_entity.module, line 2177 - Extends Drupal file entities to be fieldable and viewable.
Code
function file_entity_file_default_types() {
$types = array();
// Image.
$types['image'] = (object) array(
'api_version' => 1,
'type' => 'image',
'label' => t('Image'),
'description' => t('An <em>Image</em> file is a still visual.'),
'mimetypes' => array(
'image/*',
),
);
// Video.
$types['video'] = (object) array(
'api_version' => 1,
'type' => 'video',
'label' => t('Video'),
'description' => t('A <em>Video</em> file is a moving visual recording.'),
'mimetypes' => array(
'video/*',
),
);
// Audio.
$types['audio'] = (object) array(
'api_version' => 1,
'type' => 'audio',
'label' => t('Audio'),
'description' => t('An <em>Audio</em> file is a sound recording.'),
'mimetypes' => array(
'audio/*',
),
);
// Document.
$types['document'] = (object) array(
'api_version' => 1,
'type' => 'document',
'label' => t('Document'),
'description' => t('A <em>Document</em> file is written information.'),
'mimetypes' => array(
'text/html',
'text/plain',
'application/acad',
'application/msword',
'application/vnd.ms-excel',
'application/pdf',
'application/vnd.ms-powerpoint',
'application/vnd.oasis.opendocument.text',
'application/vnd.oasis.opendocument.spreadsheet',
'application/vnd.oasis.opendocument.presentation',
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
'application/vnd.openxmlformats-officedocument.presentationml.presentation',
'application/vnd.openxmlformats-officedocument.wordprocessingml.document',
'application/zip',
'application/x-7z-compressed',
'application/x-tar',
'application/gzip',
),
);
return $types;
}