You are here

public function NumberFormatterFactory::createInstance in Price 8

Same name and namespace in other branches
  1. 3.x src/NumberFormatterFactory.php \Drupal\price\NumberFormatterFactory::createInstance()
  2. 3.0.x src/NumberFormatterFactory.php \Drupal\price\NumberFormatterFactory::createInstance()

Creates an instance of the number formatter for the current locale.

Return value

\Drupal\price\LegacyNumberFormatter The created number formatter.

Overrides NumberFormatterFactoryInterface::createInstance

File

src/NumberFormatterFactory.php, line 36

Class

NumberFormatterFactory
Defines the NumberFormatter factory.

Namespace

Drupal\price

Code

public function createInstance() {
  return new LegacyNumberFormatter($this->currencyFormatter);
}