You are here

function patterns_utils_is_module_enabled in Patterns 7.2

Same name and namespace in other branches
  1. 7 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

5 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
patterns_info_parsers in includes/forms/info.inc
Displays a summary of Patterns parsers

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;
}