You are here

public function SearchApiAlterAddCombined::configurationFormSubmit in Search API Combined Fields 7

Implements SearchApiAlterCallbackInterface::configurationFormSubmit().

Overrides SearchApiAbstractAlterCallback::configurationFormSubmit

File

./callback_add_combined.inc, line 124

Class

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

Code

public function configurationFormSubmit(array $form, array &$values, array &$form_state) {
  if (empty($values['fields'])) {
    return array();
  }
  $index_fields = $this->index
    ->getFields(FALSE);
  foreach ($values['fields'] as $name => $field) {
    if (!$field['name']) {
      unset($values['fields'][$name]);
    }
    else {
      $values['fields'][$name]['description'] = $this
        ->fieldDescription($field, $index_fields);
    }
  }
  $this->options = $values;
  return $values;
}