[drupal-devel] [feature] Module enabling/initialization hook for
drupal-devel at drupal.org
Mon Sep 12 17:21:35 UTC 2005
Issue status update for
Post a follow up:
Component: module system
Category: feature requests
Assigned to: Anonymous
Reported by: nedjo
Updated by: nedjo
Status: patch (code needs review)
Attachment: http://drupal.org/files/issues/module_enable_hook.patch (1.05 KB)
A module often has some one-time setup initialization to do, some of
which can be easily automated (e.g., set a system variable), some of
which may require site admin input. But there's no available method to
detect and act on module enabling.
So the attached patch implements one possible approach: a new _enable()
hook, that would be called when a module is enabled.
I suppose an alternate approach would be simply to redirect to the
module's setting's page, if available; but, because multiple modules
can be enabled at the same time, that might be impractical.
I know, three days before code freeze is not the best time to be
bringing up new proposed hooks! I'll be happy to wait until next cycle
to work the idea through.
More information about the drupal-devel