You are here

public function TextDataType::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

src/Plugin/search_api/data_type/TextDataType.php, line 32

Class

TextDataType
Provides a full text data type.

Namespace

Drupal\search_api\Plugin\search_api\data_type

Code

public function getValue($value) {
  return new TextValue((string) $value);
}