function drush_pm_info

8.0.x info.pm.inc drush_pm_info()
6.x info.pm.inc drush_pm_info()
7.x info.pm.inc drush_pm_info()
3.x pm.drush.inc drush_pm_info()
4.x pm.drush.inc drush_pm_info()
5.x info.pm.inc drush_pm_info()
master info.pm.inc drush_pm_info()

Command callback. Show detailed info for one or more extension.

File

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

Code

function drush_pm_info() {
  $args = _convert_csv_to_array(func_get_args());

  $extension_info = drush_pm_get_extensions();
  _drush_pm_expand_extensions($args, $extension_info);
  // If no extensions are provided, select all but the hidden ones.
  if (count($args) == 0) {
    foreach ($extension_info as $key => $extension) {
      if (isset($extension->info['hidden'])) {
        unset($extension_info[$key]);
      }
    }
    $args = array_keys($extension_info);
  }

  foreach ($args as $project) {
    if (isset($extension_info[$project])) {
      $info = $extension_info[$project];
    }
    else {
      drush_log(dt('!project was not found.', array('!project' => $project)), 'warning');
      continue;
    }
    if ($info->type == 'module') {
      $data = _drush_pm_info_module($info);
    }
    else {
      $data = _drush_pm_info_theme($info);
    }
    drush_print_table(drush_key_value_to_array_table($data));
    print "\n";
  }
}