You are here

protected function RangeIntegerFormatter::formatNumber in Range 8

Formats a number.

Parameters

mixed $number: The numeric value.

Return value

string The formatted number.

Overrides RangeFormatterBase::formatNumber

1 method overrides RangeIntegerFormatter::formatNumber()
RangeDecimalFormatter::formatNumber in src/Plugin/Field/FieldFormatter/RangeDecimalFormatter.php
Formats a number.

File

src/Plugin/Field/FieldFormatter/RangeIntegerFormatter.php, line 61

Class

RangeIntegerFormatter
Plugin implementation of the 'range_integer' formatter.

Namespace

Drupal\range\Plugin\Field\FieldFormatter

Code

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