You are here

protected function SearchApiAlterAddAggregation::fieldDescription in Search API 7

Helper method for creating a field description.

1 call to SearchApiAlterAddAggregation::fieldDescription()
SearchApiAlterAddAggregation::configurationFormSubmit in includes/callback_add_aggregation.inc
Implements SearchApiAlterCallbackInterface::configurationFormSubmit().

File

includes/callback_add_aggregation.inc, line 289
Contains SearchApiAlterAddAggregation.

Class

SearchApiAlterAddAggregation
Search API data alteration callback that adds an URL field for all items.

Code

protected function fieldDescription(array $field, array $index_fields) {
  $fields = array();
  foreach ($field['fields'] as $f) {
    $fields[] = isset($index_fields[$f]) ? $index_fields[$f]['name'] : $f;
  }
  $type = $this
    ->getTypes();
  $type = $type[$field['type']];
  return t('A @type aggregation of the following fields: @fields.', array(
    '@type' => $type,
    '@fields' => implode(', ', $fields),
  ));
}