function file_entity_permissions_get_configured_types in File Entity (fieldable files) 7.2
Same name and namespace in other branches
- 7.3 file_entity.module \file_entity_permissions_get_configured_types()
Returns an array of file types that should be managed by permissions.
By default, this will include all file types in the system. To exclude a specific file from getting permissions defined for it, set the file_entity_permissions_$type variable to 0. File entity does not provide an interface for doing so, however, contrib modules may exclude their own files in hook_install(). Alternatively, contrib modules may configure all file types at once, or decide to apply some other hook_file_entity_access() implementation to some or all file types.
Return value
An array of file types managed by this module.
Related topics
2 calls to file_entity_permissions_get_configured_types()
- file_entity_file_entity_access in ./
file_entity.module - Implements hook_file_entity_access().
- file_entity_permission in ./
file_entity.module - Implement hook_permission().
File
- ./
file_entity.module, line 2159 - Extends Drupal file entities to be fieldable and viewable.
Code
function file_entity_permissions_get_configured_types() {
$configured_types = array();
foreach (file_type_get_enabled_types() as $type => $info) {
if (variable_get('file_entity_permissions_' . $type, 1)) {
$configured_types[] = $type;
}
}
return $configured_types;
}