function patterns_disable_modules in Patterns 7.2
Same name and namespace in other branches
- 7 includes/core/modules.inc \patterns_disable_modules()
Disable the specified modules.
Parameters
array $modules:
boolean $deps if TRUE also all the modules dependent: will be disabled as well.
1 call to patterns_disable_modules()
- patterns_start_engine in ./
patterns.module - The beginning of the whole Patterns logic. Starts the execution in 'batch' mode (default) or 'php' mode, which makes things easier for debugging.
File
- includes/
core/ modules.inc, line 57 - Functions to install and uninstall modules during the pattern execution.
Code
function patterns_disable_modules(&$modules, $deps = TRUE) {
$result = array(
'success' => TRUE,
);
if (empty($modules)) {
return $result;
}
require_once DRUPAL_ROOT . '/' . 'includes/install.inc';
module_disable($modules, TRUE);
system_rebuild_module_data();
$result['disabled_modules'] = $modules;
return $result;
}