You are here

function file_entity_hook_info_alter in File Entity (fieldable files) 7.3

Same name and namespace in other branches
  1. 8.2 file_entity.module \file_entity_hook_info_alter()
  2. 7.2 file_entity.module \file_entity_hook_info_alter()

Implements hook_hook_info_alter().

Add support for existing core hooks to be located in modulename.file.inc.

File

./file_entity.module, line 63
Extends Drupal file entities to be fieldable and viewable.

Code

function file_entity_hook_info_alter(&$info) {
  $hooks = array(
    // File API hooks
    'file_copy',
    'file_move',
    'file_validate',
    // File access
    'file_download',
    'file_download_access',
    'file_download_access_alter',
    // File entity hooks
    'file_load',
    'file_presave',
    'file_insert',
    'file_update',
    'file_delete',
    // Miscellaneous hooks
    'file_mimetype_mapping_alter',
    'file_url_alter',
    // Stream wrappers
    'stream_wrappers',
    'stream_wrappers_alter',
  );
  $info += array_fill_keys($hooks, array(
    'group' => 'file',
  ));
}