You are here

public function SearchApiCombinedEntityDataSourceController::configurationFormSubmit in Search API 7

Submit callback for the form returned by configurationForm().

This method will only be called if that form was non-empty.

Any necessary changes to the submitted values should be made, afterwards they will automatically be stored as the index's "datasource" options. The method can also be used by the datasource controller to react to the possible change in its settings.

Parameters

array $form: The form returned by configurationForm().

array $values: The part of the $form_state['values'] array corresponding to this form.

array $form_state: The complete form state.

Overrides SearchApiAbstractDataSourceController::configurationFormSubmit

File

includes/datasource_multiple.inc, line 272
Contains SearchApiCombinedEntityDataSourceController.

Class

SearchApiCombinedEntityDataSourceController
Provides a datasource for indexing multiple types of entities.

Code

public function configurationFormSubmit(array $form, array &$values, array &$form_state) {
  if (!empty($values['types'])) {
    $values['types'] = array_keys(array_filter($values['types']));
  }
}