You are here

protected function FieldsProcessorPluginBase::processKey in Search API 8

Processes a single search keyword.

The default implementation just calls process().

Parameters

string $value: The string value to preprocess, as a reference. Can be manipulated directly, nothing has to be returned. Can either be left a string, or be changed into a nested keys array, as defined by \Drupal\search_api\ParseMode\ParseModeInterface::parseInput().

2 calls to FieldsProcessorPluginBase::processKey()
FieldsProcessorPluginBase::processKeys in src/Processor/FieldsProcessorPluginBase.php
Preprocesses the search keywords.
TestFieldsProcessorPlugin::processKey in tests/src/Unit/Processor/TestFieldsProcessorPlugin.php
Processes a single search keyword.
1 method overrides FieldsProcessorPluginBase::processKey()
TestFieldsProcessorPlugin::processKey in tests/src/Unit/Processor/TestFieldsProcessorPlugin.php
Processes a single search keyword.

File

src/Processor/FieldsProcessorPluginBase.php, line 527

Class

FieldsProcessorPluginBase
Provides a base class for processors that work on individual fields.

Namespace

Drupal\search_api\Processor

Code

protected function processKey(&$value) {
  if ($this
    ->shouldProcess($value)) {
    $this
      ->process($value);
  }
}