public function IntegerDataType::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/ IntegerDataType.php, line 22
Class
- IntegerDataType
- Provides an integer data type.
Namespace
Drupal\search_api\Plugin\search_api\data_typeCode
public function getValue($value) {
return (int) $value;
}