function patterns_utils_is_module_enabled in Patterns 7
Same name and namespace in other branches
- 7.2 includes/utils.inc \patterns_utils_is_module_enabled()
Helper function to find out whether a module is currently enabled
Parameters
mixed $module String representing the name of the module:
Return value
Bool TRUE If the module is currently enabled
6 calls to patterns_utils_is_module_enabled()
- drush_patterns_export in ./
patterns.drush.inc - Export data from the patterns components to file, zip archive, or database
- PatternsFieldTestCase::testDate in tests/
field/ field.test - PatternsIndexesTestCase::countComponents in tests/
indexes/ indexes.test - PatternsPathautoTestCase::testPathauto in tests/
pathauto/ pathauto.test - PatternsPathautoTestCase::testUrlalias in tests/
pathauto/ pathauto.test
File
- includes/
utils.inc, line 185 - Collectiion of general purpose functions.
Code
function patterns_utils_is_module_enabled($module = NULL) {
if (is_null($module)) {
return FALSE;
}
$modules = module_list();
return isset($modules[$module]) ? TRUE : FALSE;
}