Some modules provide APIs or lilbraries with certain functionalities. Other modules can require these APIs or library function to function correctly. For these modules to function correctly it doesn't always mean that the modules providing that functionality should be enabled.

One example is openid_provider (http://drupal.org/project/openid_provider). Although it uses functionality provided by the openid client that openid client module doesn't have to be enabled. It just has to be available.

Unless there is already functionality for this I think a function hook_verify_dependencies() or something could live in the .install file and the output from it could be displayed in the modules page. If it doesn't exist or returns TRUE all is well.

Comments

jax’s picture

Or you could put something like

requires[] = module_name

in the .info file.

Susurrus’s picture

I don't see a need for this as it's a very rare case. You could also just add the requirement like in #1 and just force people to enable that other module even if it doesn't need to be.

jax’s picture

Status: Active » Closed (fixed)

Apparently there is something called hook_requirements that can be used for this.