function drush_get_named_extensions_list

8.0.x environment_7.inc drush_get_named_extensions_list($extensions)
8.0.x environment_6.inc drush_get_named_extensions_list($extensions)
8.0.x environment.inc drush_get_named_extensions_list($extensions)
6.x environment_7.inc drush_get_named_extensions_list($extensions)
6.x environment_6.inc drush_get_named_extensions_list($extensions)
6.x environment.inc drush_get_named_extensions_list($extensions)
7.x environment_7.inc drush_get_named_extensions_list($extensions)
7.x environment_6.inc drush_get_named_extensions_list($extensions)
7.x environment.inc drush_get_named_extensions_list($extensions)
master environment_7.inc drush_get_named_extensions_list($extensions)
master environment.inc drush_get_named_extensions_list($extensions)

Return a list of modules from a list of named modules. Both enabled and disabled/uninstalled modules are returned.

2 calls to drush_get_named_extensions_list()
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.
_drush_pm_disable in commands/core/drupal/pm.inc
Command callback. Disable one or more extensions.

File

commands/core/drupal/environment.inc, line 169
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_get_named_extensions_list($extensions) {
  $result = array();
  $modules = drush_get_modules();
  foreach ($modules as $name => $module) {
    if (in_array($name, $extensions)) {
      $result[$name] = $module;
    }
  }
  $themes = drush_get_themes();
  foreach ($themes as $name => $theme) {
    if (in_array($name, $extensions)) {
      $result[$name] = $theme;
    }
  }
  return $result;
}