function DecimalData::getCastedValue

Same name and namespace in other branches
  1. 10 core/lib/Drupal/Core/TypedData/Plugin/DataType/DecimalData.php \Drupal\Core\TypedData\Plugin\DataType\DecimalData::getCastedValue()

Overrides StringData::getCastedValue

File

core/lib/Drupal/Core/TypedData/Plugin/DataType/DecimalData.php, line 25

Class

DecimalData
The decimal data type.

Namespace

Drupal\Core\TypedData\Plugin\DataType

Code

public function getCastedValue() {
    return $this->getString() ?: '0.0';
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.