function IntegerFormatter::numberFormat

Same name in other branches
  1. 9 core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/IntegerFormatter.php \Drupal\Core\Field\Plugin\Field\FieldFormatter\IntegerFormatter::numberFormat()
  2. 10 core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/IntegerFormatter.php \Drupal\Core\Field\Plugin\Field\FieldFormatter\IntegerFormatter::numberFormat()
  3. 11.x core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/IntegerFormatter.php \Drupal\Core\Field\Plugin\Field\FieldFormatter\IntegerFormatter::numberFormat()

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'));
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.