You are here

public function SearchApiAlterAddAggregation::propertyInfo in Search API 7

Implements SearchApiAlterCallbackInterface::propertyInfo().

Overrides SearchApiAbstractAlterCallback::propertyInfo

File

includes/callback_add_aggregation.inc, line 271
Contains SearchApiAlterAddAggregation.

Class

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

Code

public function propertyInfo() {
  $types = $this
    ->getTypes('type');
  $ret = array();
  if (isset($this->options['fields'])) {
    foreach ($this->options['fields'] as $name => $field) {
      $ret[$name] = array(
        'label' => $field['name'],
        'description' => empty($field['description']) ? '' : $field['description'],
        'type' => $types[$field['type']],
      );
    }
  }
  return $ret;
}