
| Current Path : /var/www/html/store/web/modules/contrib/commerce/modules/price/src/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/store/web/modules/contrib/commerce/modules/price/src/PhysicalNumberFormatter.php |
<?php
namespace Drupal\commerce_price;
use CommerceGuys\Intl\NumberFormat\NumberFormatRepositoryInterface;
use Drupal\commerce\CurrentLocaleInterface;
use Drupal\physical\NumberFormatterInterface;
/**
* Wraps the NumberFormatter for use by the Physical Fields module.
*
* @see \Drupal\commerce_price\CommercePriceServiceProvider
*/
class PhysicalNumberFormatter extends NumberFormatter implements NumberFormatterInterface {
/**
* Constructs a new PhysicalNumberFormatter object.
*
* @param \CommerceGuys\Intl\NumberFormat\NumberFormatRepositoryInterface $number_format_repository
* The number format repository.
* @param \Drupal\commerce\CurrentLocaleInterface $current_locale
* The current locale.
*/
public function __construct(NumberFormatRepositoryInterface $number_format_repository, CurrentLocaleInterface $current_locale) {
$default_options = [
'maximum_fraction_digits' => 6,
];
parent::__construct($number_format_repository, $current_locale, $default_options);
}
}