function _drush_pm_info_extension

8.0.x info.pm.inc _drush_pm_info_extension($info)
6.x info.pm.inc _drush_pm_info_extension($info)
7.x info.pm.inc _drush_pm_info_extension($info)
4.x pm.drush.inc _drush_pm_info_extension($info)
5.x info.pm.inc _drush_pm_info_extension($info)
master info.pm.inc _drush_pm_info_extension($info)

Return an array with general info of an extension.

2 calls to _drush_pm_info_extension()
_drush_pm_info_module in commands/pm/info.pm.inc
Return an array with info of a module.
_drush_pm_info_theme in commands/pm/info.pm.inc
Return an array with info of a theme.

File

commands/pm/info.pm.inc, line 68
pm-info command implementation.

Code

function _drush_pm_info_extension($info) {
  $major_version = drush_drupal_major_version();

  $data['extension'] = $info->name;
  $data['project'] = isset($info->info['project']) ? $info->info['project'] : dt('Unknown');
  $data['type'] = $info->type;
  $data['title'] = $info->info['name'];
  $data['config'] = isset($info->info['configure']) ? $info->info['configure'] : dt('None');
  $data['description'] = $info->info['description'];
  $data['version'] = $info->info['version'];
  $data['date'] = format_date($info->info['datestamp'], 'custom', 'Y-m-d');
  $data['package'] = $info->info['package'];
  $data['core'] = $info->info['core'];
  $data['php'] = $info->info['php'];
  $data['status'] = drush_get_extension_status($info);
  $path = (($info->type == 'module') && ($major_version == 7)) ? $info->uri : $info->filename;
  $path = substr($path, 0, strrpos($path, '/'));
  $data['path'] = $path;

  return $data;
}