You are here

public function ComputedDecimalItem::executeCode in Computed Field 3.x

Same name and namespace in other branches
  1. 8.2 src/Plugin/Field/FieldType/ComputedDecimalItem.php \Drupal\computed_field\Plugin\Field\FieldType\ComputedDecimalItem::executeCode()

Return value

float The floating point number.

Overrides ComputedFieldItemTrait::executeCode

File

src/Plugin/Field/FieldType/ComputedDecimalItem.php, line 120

Class

ComputedDecimalItem
Plugin implementation of the 'computed_decimal' field type.

Namespace

Drupal\computed_field\Plugin\Field\FieldType

Code

public function executeCode() {
  return round(parent::executeCode(), $this
    ->getSettings()['scale']);
}