You are here

function configuration_enable_modules in Configuration Management 6

Enable all of the provided modules

Parameters

&$modules: The modules list. Dependant modules will be added to this list.

Return value

True or false on success

1 call to configuration_enable_modules()
configuration_run_pass in ./configuration.module
Run through a pass of the configuration process

File

./configuration.module, line 2012
Provide a unified method for defining site configurations abstracted from their data format. Various data formats should be supported via a plugin architecture such as XML, YAML, JSON, PHP

Code

function configuration_enable_modules(&$modules) {
  if (empty($modules)) {
    return true;
  }
  $missing = configuration_check_module_dependencies(&$modules, TRUE);
  if (!empty($missing)) {
    configuration_set_error('enable_modules', array(
      '%modules' => implode(', ', $missing),
    ));
    return false;
  }
  require_once './includes/install.inc';
  drupal_install_modules($modules);
  module_rebuild_cache();
  return true;
}