You are here

protected function TestFieldsProcessorPlugin::processFieldValue in Search API 8

Processes a single text element in a field.

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 changed into an array of \Drupal\search_api\Plugin\search_api\data_type\value\TextTokenInterface objects. Returning anything else will result in undefined behavior.

string $type: The field's data type.

Overrides FieldsProcessorPluginBase::processFieldValue

File

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

Class

TestFieldsProcessorPlugin
Mimics a processor working on individual fields of items.

Namespace

Drupal\Tests\search_api\Unit\Processor

Code

protected function processFieldValue(&$value, $type) {
  if (isset($this->methodOverrides[__FUNCTION__])) {
    $this->methodOverrides[__FUNCTION__]($value, $type);
    return;
  }
  parent::processFieldValue($value, $type);
}