Detect which other modules are enabled in a new Drupal module
Asked Answered
J

1

6

I'm creating a Drupal module which doesn't necessarily depend on other modules, but could offer other options if, for example, the Path module is enabled.

What I'd like to know, and can't seem to find by searching, is whether it is possible to detect which modules are currently enabled from another module so that that module can offer options which use those modules?

Jordison answered 6/10, 2009 at 23:28 Comment(0)
S
14

You can also check like this:

if(function_exists('a_function_you_know_the_module_provides')) { }
Sacramentarian answered 6/10, 2009 at 23:33 Comment(1)
Thanks for that - crazy that I couldn't find it on any searches through the drupal site or google...Jordison

© 2022 - 2024 — McMap. All rights reserved.