public function SearchApiAlterAddCombined::propertyInfo in Search API Combined Fields 7
Implements SearchApiAlterCallbackInterface::propertyInfo().
Overrides SearchApiAbstractAlterCallback::propertyInfo
File
- ./
callback_add_combined.inc, line 201
Class
- SearchApiAlterAddCombined
- Search API data alteration callback that adds an URL field for all items.
Code
public function propertyInfo() {
$ret = array();
if (isset($this->options['fields'])) {
foreach ($this->options['fields'] as $name => $field) {
$multivalue = TRUE === isset($field['multivalue']) ? $field['multivalue'] : 1;
$type = TRUE === isset($field['type']) ? $field['type'] : 'integer';
$ret[$name] = array(
'label' => $field['name'],
'description' => empty($field['description']) ? '' : $field['description'],
'type' => TRUE == $multivalue ? 'list<' . $type . '>' : $type,
);
}
}
return $ret;
}