Same name and namespace in other branches
  1. 6.x developer/hooks/install.php \hook_enable()
  2. 7.x modules/system/system.api.php \hook_enable()

Perform necessary actions after module is enabled.

The hook is called everytime module is enabled.

Related topics

3 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 modules/comment/comment.install
Implementation of hook_enable().
module_enable in includes/module.inc
Enable a given list of modules.
node_access_example_enable in developer/examples/node_access_example.install
Implementation of hook_enable().

File

developer/hooks/install.php, line 236
Documentation for the installation and update system.

Code

function hook_enable() {
  mymodule_cache_rebuild();
}