function hook_enable
7.x system.api.php | hook_enable() |
6.x install.php | hook_enable() |
Perform necessary actions after module is enabled.
The hook is called every time the module is enabled. It should be implemented in the module's .install file. The implementation can rely on the .module file being loaded.
See also
Related topics
11 functions implement hook_enable()
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
- comment_enable in drupal-7.x/
modules/ comment/ comment.install - Implements hook_enable().
- dashboard_enable in drupal-7.x/
modules/ dashboard/ dashboard.install - Implements hook_enable().
- forum_enable in drupal-7.x/
modules/ forum/ forum.install - Implements hook_enable().
- menu_enable in drupal-7.x/
modules/ menu/ menu.module - Implements hook_enable().
- module_enable in drupal-7.x/
includes/ module.inc - Enables or installs a given list of modules.
1 invocation of hook_enable()
- module_enable in drupal-7.x/
includes/ module.inc - Enables or installs a given list of modules.
File
- drupal-7.x/
modules/ system/ system.api.php, line 3559 - Hooks provided by Drupal core and the System module.
Code
function hook_enable() {
mymodule_cache_rebuild();
}