3 namespace Drupal\Core\TypedData\Plugin\DataType;
5 use Drupal\Core\TypedData\PrimitiveBase;
6 use Drupal\Core\TypedData\Type\FloatInterface;
11 * The plain value of a float is a regular PHP float. For setting the value
12 * any PHP variable that casts to a float may be passed.
16 * label = @Translation("Float")
19 class FloatData extends PrimitiveBase implements FloatInterface {
24 public function getCastedValue() {
25 return (float) $this->value;