interface AmountFormatterInterface in Currency 8.3
Defines a plugin type to format amounts.
Hierarchy
- interface \Drupal\Component\Plugin\PluginInspectionInterface
- interface \Drupal\currency\Plugin\Currency\AmountFormatter\AmountFormatterInterface
Expanded class hierarchy of AmountFormatterInterface
All classes that implement AmountFormatterInterface
4 files declare their use of AmountFormatterInterface
- AmountFormatterManagerTest.php in tests/
src/ Unit/ Plugin/ Currency/ AmountFormatter/ AmountFormatterManagerTest.php - CurrencyTest.php in tests/
src/ Unit/ Entity/ CurrencyTest.php - FixedRatesOverviewTest.php in tests/
src/ Unit/ Controller/ FixedRatesOverviewTest.php - Intl.php in modules/
currency_intl/ src/ Plugin/ Currency/ AmountFormatter/ Intl.php
File
- src/
Plugin/ Currency/ AmountFormatter/ AmountFormatterInterface.php, line 12
Namespace
Drupal\currency\Plugin\Currency\AmountFormatterView source
interface AmountFormatterInterface extends PluginInspectionInterface {
/**
* Formats an amount.
*
* @param \Commercie\Currency\CurrencyInterface $currency
* The currency the amount is in.
* @param string $amount
* A numeric string.
* @param string $language_type
* One of the \Drupal\Core\Language\LanguageInterface\TYPE_* constants.
*
* @return string|\Drupal\Core\StringTranslation\TranslatableMarkup
*/
function formatAmount(CurrencyInterface $currency, $amount, $language_type = LanguageInterface::TYPE_CONTENT);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AmountFormatterInterface:: |
function | Formats an amount. | 2 | |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |