function drush_module_enable

8.0.x environment_7.inc drush_module_enable($modules)
8.0.x environment_6.inc drush_module_enable($modules)
8.0.x environment.inc drush_module_enable($modules)
6.x environment_6.inc drush_module_enable($modules)
6.x environment.inc drush_module_enable($modules)
6.x environment_7.inc drush_module_enable($modules)
7.x environment_7.inc drush_module_enable($modules)
7.x environment_6.inc drush_module_enable($modules)
7.x environment.inc drush_module_enable($modules)
3.x environment_7.inc drush_module_enable($modules)
3.x environment_6.inc drush_module_enable($modules)
3.x environment_5.inc drush_module_enable($modules)
4.x environment_6.inc drush_module_enable($modules)
4.x environment_5.inc drush_module_enable($modules)
4.x environment.inc drush_module_enable($modules)
5.x environment_6.inc drush_module_enable($modules)
5.x environment.inc drush_module_enable($modules)
master environment_7.inc drush_module_enable($modules)
master environment.inc drush_module_enable($modules)

Enable a list of modules. It is assumed the list contains all the dependencies not already enabled.

Parameters

$modules: Array of module names

1 call to drush_module_enable()
drush_pm_enable in commands/pm/pm.drush.inc
Command callback. Enable one or more extensions from downloaded projects. Note that the modules and themes to be enabled were evaluated during the pm-enable validate hook, above.

File

commands/core/drupal/environment.inc, line 194
Specific functions for a drupal 8+ environment. drush_include_engine() magically includes either this file or environment_X.inc depending on which version of drupal Drush is called from.

Code

function drush_module_enable($modules) {
  // The list of modules already have all the dependencies, but they might not
  // be in the correct order. Still pass $enable_dependencies = TRUE so that
  // Drupal will enable the modules in the correct order.
  drush_module_install($modules);

  // Our logger got blown away during the container rebuild above.
  $boot = drush_select_bootstrap_class();
  $boot->add_logger();

  // Flush all caches. No longer needed in D8 per https://github.com/drush-ops/drush/issues/1207
  // drupal_flush_all_caches();
}