function drush_module_list

8.0.x environment_7.inc drush_module_list()
8.0.x environment_6.inc drush_module_list()
8.0.x environment.inc drush_module_list()
6.x environment_7.inc drush_module_list()
6.x environment_6.inc drush_module_list()
6.x environment.inc drush_module_list()
7.x environment_7.inc drush_module_list()
7.x environment_6.inc drush_module_list()
7.x environment.inc drush_module_list()
master environment_7.inc drush_module_list()
master environment.inc drush_module_list()

Returns a list of enabled modules.

This is a wrapper for module_list().

5 calls to drush_module_list()
DrupalBoot::commandfile_searchpaths in lib/Drush/Boot/DrupalBoot.php
drush_pm_enable_validate in commands/pm/pm.drush.inc
Validate callback. Determine the modules and themes that the user would like enabled.
drush_pm_updatecode_postupdate in commands/pm/pm.drush.inc
Command callback. Execute updatecode-postupdate.
RoleBase::getAllModulePerms in lib/Drush/Role/RoleBase.php
_drush_pm_disable in commands/core/drupal/pm.inc
Command callback. Disable one or more extensions.

File

commands/core/drupal/environment.inc, line 119
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_list() {
  $modules = array_keys(\Drupal::moduleHandler()->getModuleList());
  return array_combine($modules, $modules);
}