protected function IntegerFormatter::numberFormat in Drupal 10
Same name and namespace in other branches
- 8 core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/IntegerFormatter.php \Drupal\Core\Field\Plugin\Field\FieldFormatter\IntegerFormatter::numberFormat()
- 9 core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/IntegerFormatter.php \Drupal\Core\Field\Plugin\Field\FieldFormatter\IntegerFormatter::numberFormat()
Formats a number.
Parameters
mixed $number: The numeric value.
Return value
string The formatted number.
Overrides NumericFormatterBase::numberFormat
File
- core/
lib/ Drupal/ Core/ Field/ Plugin/ Field/ FieldFormatter/ IntegerFormatter.php, line 35
Class
- IntegerFormatter
- Plugin implementation of the 'number_integer' formatter.
Namespace
Drupal\Core\Field\Plugin\Field\FieldFormatterCode
protected function numberFormat($number) {
return number_format($number, 0, '', $this
->getSetting('thousand_separator'));
}