public function IgnoreCharacters::submitConfigurationForm in Search API 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/ IgnoreCharacters.php, line 105
Class
- IgnoreCharacters
- Configure types of characters which should be ignored for searches.
Namespace
Drupal\search_api\Plugin\search_api\processorCode
public function submitConfigurationForm(array &$form, FormStateInterface $form_state) {
$config = $form_state
->getValues();
unset($config['strip']);
// Get our own version of 'ignorable_classes' from form values.
$classes = $form_state
->getValue([
'strip',
'character_sets',
], []);
$config['ignorable_classes'] = array_values(array_filter($classes));
$this
->setConfiguration($config);
}