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