You are here

public function Server::submitConfigurationForm in Search API Autocomplete 8

Form submission handler.

Parameters

array $form: An associative array containing the structure of the plugin form as built by static::buildConfigurationForm().

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the complete form.

Overrides PluginFormTrait::submitConfigurationForm

See also

\Drupal\Core\Plugin\PluginFormInterface::submitConfigurationForm()

File

src/Plugin/search_api_autocomplete/suggester/Server.php, line 151

Class

Server
Provides a suggester plugin that retrieves suggestions from the server.

Namespace

Drupal\search_api_autocomplete\Plugin\search_api_autocomplete\suggester

Code

public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
  $values = $form_state
    ->getValues();
  $values['fields'] = array_keys(array_filter($values['fields']));
  $this
    ->setConfiguration($values);
}