function drush_pm_classify_extensions

8.0.x pm.drush.inc drush_pm_classify_extensions(&$extensions, &$modules, &$themes, $extension_info)
6.x pm.drush.inc drush_pm_classify_extensions(&$extensions, &$modules, &$themes, $extension_info)
7.x pm.drush.inc drush_pm_classify_extensions(&$extensions, &$modules, &$themes, $extension_info)
4.x pm.drush.inc drush_pm_classify_extensions(&$extensions, &$modules, &$themes, $extension_info)
5.x pm.drush.inc drush_pm_classify_extensions(&$extensions, &$modules, &$themes, $extension_info)
master pm.drush.inc drush_pm_classify_extensions(&$extensions, &$modules, &$themes, $extension_info)

Classify extensions as modules, themes or unknown.

Parameters

$extensions: Array of extension names, by reference.

$modules: Empty array to be filled with modules in the provided extension list.

$themes: Empty array to be filled with themes in the provided extension list.

Related topics

3 calls to drush_pm_classify_extensions()
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_disable in commands/core/drupal/pm.inc
Command callback. Disable one or more extensions.
_drush_pm_uninstall in commands/core/drupal/pm_8.inc
Command callback. Uninstall one or more extensions.

File

commands/pm/pm.drush.inc, line 625
The drush Project Manager

Code

function drush_pm_classify_extensions(&$extensions, &$modules, &$themes, $extension_info) {
  _drush_pm_expand_extensions($extensions, $extension_info);
  foreach ($extensions as $extension) {
    if (!isset($extension_info[$extension])) {
      continue;
    }
    $type = drush_extension_get_type($extension_info[$extension]);
    if ($type == 'module') {
      $modules[$extension] = $extension;
    }
    else if ($type == 'theme') {
      $themes[$extension] = $extension;
    }
  }
}