You are here

public function SearchApiEntityDataSourceController::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_entity.inc, line 295
Contains the SearchApiEntityDataSourceController class.

Class

SearchApiEntityDataSourceController
Represents a datasource for all entities known to the Entity API.

Code

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