You are here

protected function TestFieldsProcessorPlugin::process in Search API 8

Processes a single string value.

This method is ultimately called for all text by the standard implementation, and does nothing by default.

Parameters

mixed $value: The value to preprocess, as a reference. Can be manipulated directly, nothing has to be returned. Since this can be called for all value types, $value has to remain the same type. The possible types for $value depend on shouldProcess().

Overrides FieldsProcessorPluginBase::process

See also

\Drupal\search_api\Processor\FieldsProcessorPluginBase::shouldProcess()

File

tests/src/Unit/Processor/TestFieldsProcessorPlugin.php, line 132

Class

TestFieldsProcessorPlugin
Mimics a processor working on individual fields of items.

Namespace

Drupal\Tests\search_api\Unit\Processor

Code

protected function process(&$value) {
  if (isset($this->methodOverrides[__FUNCTION__])) {
    $this->methodOverrides[__FUNCTION__]($value);
    return;
  }
  if ($value !== NULL) {
    $value = "*{$value}";
  }
  else {
    $value = 'undefined';
  }
}