You are here

public function Grouping::submitConfigurationForm in Search API Grouping 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/processor/Grouping.php, line 49

Class

Grouping
Processor for grouping up items on behalf of user defined fields.

Namespace

Drupal\search_api_grouping\Plugin\search_api\processor

Code

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