function _drush_pm_info_format_table_data

8.0.x info.pm.inc _drush_pm_info_format_table_data($data)
6.x info.pm.inc _drush_pm_info_format_table_data($data)
7.x info.pm.inc _drush_pm_info_format_table_data($data)
master info.pm.inc _drush_pm_info_format_table_data($data)

Output format formatter-filter callback.

See also

drush_parse_command()

drush_outputformat

1 string reference to '_drush_pm_info_format_table_data'
pm_drush_command in commands/pm/pm.drush.inc
Implementation of hook_drush_command().

File

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

Code

function _drush_pm_info_format_table_data($data) {
  $result = array();
  foreach ($data as $extension => $info) {
    foreach ($info as $key => $value) {
      if (is_array($value)) {
        if (empty($value)) {
          $value = 'none';
        }
        else {
          $value = implode(', ', $value);
        }
      }
      $result[$extension][$key] = $value;
    }
  }
  return $result;
}