You are here

function AmountFormatterInterface::formatAmount in Currency 8.3

Formats an amount.

Parameters

\Commercie\Currency\CurrencyInterface $currency: The currency the amount is in.

string $amount: A numeric string.

string $language_type: One of the \Drupal\Core\Language\LanguageInterface\TYPE_* constants.

Return value

string|\Drupal\Core\StringTranslation\TranslatableMarkup

2 methods override AmountFormatterInterface::formatAmount()
Basic::formatAmount in src/Plugin/Currency/AmountFormatter/Basic.php
Formats an amount.
Intl::formatAmount in modules/currency_intl/src/Plugin/Currency/AmountFormatter/Intl.php
Formats an amount.

File

src/Plugin/Currency/AmountFormatter/AmountFormatterInterface.php, line 26

Class

AmountFormatterInterface
Defines a plugin type to format amounts.

Namespace

Drupal\currency\Plugin\Currency\AmountFormatter

Code

function formatAmount(CurrencyInterface $currency, $amount, $language_type = LanguageInterface::TYPE_CONTENT);