function NumericFormatterBase::numberFormat

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

Formats a number.

Parameters

mixed $number: The numeric value.

Return value

string The formatted number.

2 calls to NumericFormatterBase::numberFormat()
NumericFormatterBase::settingsSummary in core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/NumericFormatterBase.php
Returns a short summary for the current formatter settings.
NumericFormatterBase::viewElements in core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/NumericFormatterBase.php
Builds a renderable array for a field value.
2 methods override NumericFormatterBase::numberFormat()
DecimalFormatter::numberFormat in core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/DecimalFormatter.php
Formats a number.
IntegerFormatter::numberFormat in core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/IntegerFormatter.php
Formats a number.

File

core/lib/Drupal/Core/Field/Plugin/Field/FieldFormatter/NumericFormatterBase.php, line 97

Class

NumericFormatterBase
Parent plugin for decimal and integer formatters.

Namespace

Drupal\Core\Field\Plugin\Field\FieldFormatter

Code

protected abstract function numberFormat($number);

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