function DecimalFormatter::numberFormat
Same name in other branches
- 9 core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/DecimalFormatter.php \Drupal\Core\Field\Plugin\Field\FieldFormatter\DecimalFormatter::numberFormat()
- 8.9.x core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/DecimalFormatter.php \Drupal\Core\Field\Plugin\Field\FieldFormatter\DecimalFormatter::numberFormat()
- 11.x core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/DecimalFormatter.php \Drupal\Core\Field\Plugin\Field\FieldFormatter\DecimalFormatter::numberFormat()
Overrides NumericFormatterBase::numberFormat
File
-
core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldFormatter/ DecimalFormatter.php, line 67
Class
- DecimalFormatter
- Plugin implementation of the 'number_decimal' formatter.
Namespace
Drupal\Core\Field\Plugin\Field\FieldFormatterCode
protected function numberFormat($number) {
return number_format($number, $this->getSetting('scale'), $this->getSetting('decimal_separator'), $this->getSetting('thousand_separator'));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.