You are here

public function SearchApiFederatedSolrField::configurationFormSubmit in Search API Federated Solr 7

Same name and namespace in other branches
  1. 7.3 src/SearchApiFederatedSolrField.php \SearchApiFederatedSolrField::configurationFormSubmit()
  2. 7.2 src/SearchApiFederatedSolrField.php \SearchApiFederatedSolrField::configurationFormSubmit()

Implements SearchApiAlterCallbackInterface::configurationFormSubmit().

Overrides SearchApiAbstractAlterCallback::configurationFormSubmit

File

src/SearchApiFederatedSolrField.php, line 158

Class

SearchApiFederatedSolrField

Code

public function configurationFormSubmit(array $form, array &$values, array &$form_state) {
  foreach ($values['fields'] as $key => $field) {
    if ($key != $field['machine_name']) {
      unset($values['fields'][$key]);
      $values['fields'][$field['machine_name']] = $field;
    }
  }
  $this->options = $values;
  return $values;
}