function drush_pm_classify_projects

3.x pm.drush.inc drush_pm_classify_projects(&$projects, &$modules, &$themes, $project_info)

Classify projects in modules, themes or unknown ones.

Parameters

$projects: Array of project names, by reference.

$modules: Empty array to be filled with modules in $projects.

$themes: Empty array to be filled with themes in $projects.

2 calls to drush_pm_classify_projects()
drush_pm_disable in commands/pm/pm.drush.inc
Command callback. Disable one or more projects.
drush_pm_enable in commands/pm/pm.drush.inc
Command callback. Enable one or more projects.

File

commands/pm/pm.drush.inc, line 540
The drush Package Manager

Code

function drush_pm_classify_projects(&$projects, &$modules, &$themes, $project_info) {
  _drush_pm_expand_projects($projects, $project_info);
  foreach ($projects as $project) {
    if (!isset($project_info[$project])) {
      continue;
    }
    if ($project_info[$project]->type == 'module') {
      $modules[$project] = $project;
    }
    else if ($project_info[$project]->type == 'theme') {
      $themes[$project] = $project;
    }
  }
}