function _drush_field_info_process_cell

8.0.x field.drush.inc _drush_field_info_process_cell($data, $metadata)
6.x field.drush.inc _drush_field_info_process_cell($data, $metadata)
7.x field.drush.inc _drush_field_info_process_cell($data, $metadata)

We need to handle the formatting of cells in table-format output specially. In 'types' output, the output data is a simple associative array of machine names => human-readable names. We choose to show the machine names. In 'fields' output, the output data is a list of entity types, each of which contains a list of bundles. We comma-separate the bundles, and space-separate the entities.

1 string reference to '_drush_field_info_process_cell'
field_drush_command in commands/core/field.drush.inc
Implementation of hook_drush_command().

File

commands/core/field.drush.inc, line 347
Field API's drush integration

Code

function _drush_field_info_process_cell($data, $metadata) {
  $first = reset($data);
  if (is_array($first)) {
    foreach ($data as $entity => $bundles) {
      $list[] = drush_format($bundles, array(), 'csv');
    }
    return drush_format($list, array(), 'list');
  }
  return drush_format(array_keys($data), array(), 'csv');
}