protected static function ListFloatItem::castAllowedValue in Drupal 9
Same name and namespace in other branches
- 8 core/modules/options/src/Plugin/Field/FieldType/ListFloatItem.php \Drupal\options\Plugin\Field\FieldType\ListFloatItem::castAllowedValue()
Converts a value to the correct type.
Parameters
mixed $value: The value to cast.
Return value
mixed The casted value.
Overrides ListItemBase::castAllowedValue
File
- core/
modules/ options/ src/ Plugin/ Field/ FieldType/ ListFloatItem.php, line 112
Class
- ListFloatItem
- Plugin implementation of the 'list_float' field type.
Namespace
Drupal\options\Plugin\Field\FieldTypeCode
protected static function castAllowedValue($value) {
return (double) $value;
}