function hook_hook_info


Error message

User warning: The following module is missing from the file system: theme/theme. For information about how to fix this, see the documentation page. in _drupal_trigger_error_with_delayed_logging() (line 1156 of /var/www/html/elmsln_community/
cis7 system.api.php hook_hook_info()
cle7 system.api.php hook_hook_info()
elmsmedia7 system.api.php hook_hook_info()
icor7 system.api.php hook_hook_info()
meedjum_blog7 system.api.php hook_hook_info()
mooc7 system.api.php hook_hook_info()

Defines one or more hooks that are exposed by a module.

Normally hooks do not need to be explicitly defined. However, by declaring a hook explicitly, a module may define a "group" for it. Modules that implement a hook may then place their implementation in either $module.module or in $module.$ If the hook is located in $module.$, then that file will be automatically loaded when needed. In general, hooks that are rarely invoked and/or are very large should be placed in a separate include file, while hooks that are very short or very frequently called should be left in the main module file so that they are always available.

Return value

An associative array whose keys are hook names and whose values are an associative array containing:

  • group: A string defining the group to which the hook belongs. The module system will determine whether a file with the name $module.$ exists, and automatically load it when required.

See system_hook_info() for all hook groups defined by Drupal core.

See also


Related topics

14 functions implement hook_hook_info()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

advagg_hook_info in sites/all/modules/ulmus/advagg/advagg.module
Implements hook_hook_info().
diff_hook_info in sites/all/modules/ulmus/diff/diff.module
Implements hook_hook_info().
ds_hook_info in sites/all/modules/ulmus/ds/ds.module
Implements hook_hook_info().
entity_hook_info in sites/all/modules/ulmus/entity/includes/
Implements hook_hook_info().
features_hook_info in sites/all/modules/ulmus/features/features.module
Implements hook_hook_info().

... See full list


modules/system/system.api.php, line 37
Hooks provided by Drupal core and the System module.


function hook_hook_info() {
  $hooks['token_info'] = array(
    'group' => 'tokens',
  $hooks['tokens'] = array(
    'group' => 'tokens',
  return $hooks;