You are here

function patterns_utils_is_module_available in Patterns 7.2

Same name and namespace in other branches
  1. 7 includes/utils.inc \patterns_utils_is_module_available()

Helper function to find out whether a module is currently installed

Parameters

mixed $module String representing the name of the module:

Return value

Bool TRUE If the module is currently installed

File

includes/utils.inc, line 172
Collectiion of general purpose functions.

Code

function patterns_utils_is_module_available($module = NULL) {
  if (is_null($module)) {
    return FALSE;
  }
  $modules = system_rebuild_module_data();
  return isset($modules[$module]) ? TRUE : FALSE;
}