You are here

public function ConfigurablePropertyBase::submitConfigurationForm in Search API 8

Submits a configuration form for a field based on this property.

Parameters

\Drupal\search_api\Item\FieldInterface $field: The field for which the configuration form is submitted.

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 ConfigurablePropertyInterface::submitConfigurationForm

1 method overrides ConfigurablePropertyBase::submitConfigurationForm()
AggregatedFieldProperty::submitConfigurationForm in src/Plugin/search_api/processor/Property/AggregatedFieldProperty.php
Submits a configuration form for a field based on this property.

File

src/Processor/ConfigurablePropertyBase.php, line 28

Class

ConfigurablePropertyBase
Provides a base class for configurable processor-defined properties.

Namespace

Drupal\search_api\Processor

Code

public function submitConfigurationForm(FieldInterface $field, array &$form, FormStateInterface $form_state) {
  $values = array_intersect_key($form_state
    ->getValues(), $this
    ->defaultConfiguration());
  $field
    ->setConfiguration($values);
}