You are here

protected function RangeIntegerSprintfFormatter::formatNumber in Range 8

Formats a number.

Parameters

mixed $number: The numeric value.

Return value

string The formatted number.

Overrides RangeFormatterBase::formatNumber

File

src/Plugin/Field/FieldFormatter/RangeIntegerSprintfFormatter.php, line 54

Class

RangeIntegerSprintfFormatter
Plugin implementation of the 'range_integer_sprintf' formatter.

Namespace

Drupal\range\Plugin\Field\FieldFormatter

Code

protected function formatNumber($number) {
  return sprintf(FieldFilteredMarkup::create($this
    ->getSetting('format_string')), $number);
}