1 file.module file_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_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_access() implementation to some or all file types.

Return value

An array of file types managed by this module.:

Related topics


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


function file_permissions_get_configured_types() {

  $configured_types = array();

  /* @todo: Make configuration for this*/
  foreach (file_type_get_types() as $type => $info) {
    $configured_types[] = $info->type;

  return $configured_types;