function _drush_pm_info_module

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

Return an array with info of a module.

1 call to _drush_pm_info_module()
drush_pm_info in commands/pm/info.pm.inc
Command callback. Show detailed info for one or more extensions.

File

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

Code

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

  $data = _drush_pm_info_extension($info);
  if ($info->schema_version > 0) {
    $schema_version = $info->schema_version;
  }
  elseif ($info->schema_version == -1) {
    $schema_version = "no schema installed";
  }
  else {
    $schema_version = "module has no schema";
  }
  $data['schema_version'] = $schema_version;
  if ($major_version == 7) {
    $data['files'] = $info->info['files'];
  }
  $data['requires'] = $info->info['dependencies'];

  if ($major_version == 6) {
    $requiredby = $info->info['dependents'];
  }
  else {
    $requiredby = array_keys($info->required_by);
  }
  $data['required_by'] = $requiredby;
  if ($info->status == 1) {
    $role = drush_role_get_class();
    $data['permissions'] = $role->getModulePerms(drush_extension_get_name($info));
  }
  return $data;
}