You are here

protected function IntegerFormatter::numberFormat in Drupal 8

Same name and namespace in other branches
  1. 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\FieldFormatter

Code

protected function numberFormat($number) {
  return number_format($number, 0, '', $this
    ->getSetting('thousand_separator'));
}