You are here

interface AmountFormatterInterface in Currency 8.3

Defines a plugin type to format amounts.

Hierarchy

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\AmountFormatter
View 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

Namesort descending Modifiers Type Description Overrides
AmountFormatterInterface::formatAmount function Formats an amount. 2
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 4
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2