You are here

public function AlteringValueTestDataType::getValue in Search API 8

Converts a field value to match the data type (if needed).

Parameters

mixed $value: The value to convert.

Return value

mixed The converted value.

Overrides DataTypePluginBase::getValue

File

tests/search_api_test/src/Plugin/search_api/data_type/AlteringValueTestDataType.php, line 22

Class

AlteringValueTestDataType
Provides a dummy data type for testing purposes.

Namespace

Drupal\search_api_test\Plugin\search_api\data_type

Code

public function getValue($value) {
  return strlen($value);
}