You are here

public function MappedFieldProperty::submitConfigurationForm in Search API Field Map 4.x

Same name and namespace in other branches
  1. 8.3 src/Plugin/search_api/processor/Property/MappedFieldProperty.php \Drupal\search_api_field_map\Plugin\search_api\processor\Property\MappedFieldProperty::submitConfigurationForm()
  2. 8 src/Plugin/search_api/processor/Property/MappedFieldProperty.php \Drupal\search_api_field_map\Plugin\search_api\processor\Property\MappedFieldProperty::submitConfigurationForm()
  3. 8.2 src/Plugin/search_api/processor/Property/MappedFieldProperty.php \Drupal\search_api_field_map\Plugin\search_api\processor\Property\MappedFieldProperty::submitConfigurationForm()

File

src/Plugin/search_api/processor/Property/MappedFieldProperty.php, line 89

Class

MappedFieldProperty
Defines an "mapped field" property.

Namespace

Drupal\search_api_field_map\Plugin\search_api\processor\Property

Code

public function submitConfigurationForm(FieldInterface $field, array &$form, FormStateInterface $form_state) {
  $values = [
    'field_data' => array_filter($form_state
      ->getValue('field_data')),
  ];
  $field
    ->setConfiguration($values);
}