Home ›
Drupal's Enable hook can be tucked away in the .install fileDrupal's Enable hook can be tucked away in the .install file
Submitted by Benjamin Melançon on July 13, 2009 - 3:46pm
A cool thing about hook_enable is that Drupal can find it in your .install file, even when the module has already been installed and you are just enabling it.
(As evidenced by implementation of hook_enable in comment.install and all over contrib dot install files.)
So you can keep it out of your main .module file and throw it in your .install file.
Drupal's hook_enable can be in .install.