class FloatData in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/TypedData/Plugin/DataType/FloatData.php \Drupal\Core\TypedData\Plugin\DataType\FloatData
- 9 core/lib/Drupal/Core/TypedData/Plugin/DataType/FloatData.php \Drupal\Core\TypedData\Plugin\DataType\FloatData
The float data type.
The plain value of a float is a regular PHP float. For setting the value any PHP variable that casts to a float may be passed.
Plugin annotation
@DataType(
id = "float",
label = @Translation("Float")
)
Hierarchy
- class \Drupal\Core\TypedData\Plugin\DataType\FloatData extends \Drupal\Core\TypedData\PrimitiveBase implements \Drupal\Core\TypedData\Type\FloatInterface
Expanded class hierarchy of FloatData
1 string reference to 'FloatData'
- core.data_types.schema.yml in core/
config/ schema/ core.data_types.schema.yml - core/config/schema/core.data_types.schema.yml
File
- core/
lib/ Drupal/ Core/ TypedData/ Plugin/ DataType/ FloatData.php, line 19
Namespace
Drupal\Core\TypedData\Plugin\DataTypeView source
class FloatData extends PrimitiveBase implements FloatInterface {
/**
* {@inheritdoc}
*/
public function getCastedValue() {
return (double) $this->value;
}
}