You are here

class CurrencyAmountFormatter in Currency 8.3

Defines a currency amount formatter plugin definition.

If a plugin exposes configuration, it SHOULD also provide a configuration schema for this configuration of which the name is `plugin.plugin_configuration.currency_amount_formatter.[plugin_id]`, where `[plugin_id]` is the plugin's ID.

Hierarchy

Expanded class hierarchy of CurrencyAmountFormatter

1 file declares its use of CurrencyAmountFormatter
AmountFormatterManager.php in src/Plugin/Currency/AmountFormatter/AmountFormatterManager.php
2 classes are annotated with CurrencyAmountFormatter
Basic in src/Plugin/Currency/AmountFormatter/Basic.php
Formats amounts using string translation and number_format().
Intl in modules/currency_intl/src/Plugin/Currency/AmountFormatter/Intl.php
Formats amounts using PHP's Intl extension.

File

src/Annotation/CurrencyAmountFormatter.php, line 17

Namespace

Drupal\currency\Annotation
View source
class CurrencyAmountFormatter extends Plugin {

  /**
   * The translated human-readable plugin name (optional).
   *
   * @var string
   */
  public $description = '';

  /**
   * The plugin ID.
   *
   * @var string
   */
  public $id;

  /**
   * The translated human-readable plugin name.
   *
   * @var string
   */
  public $label;

}

Members

Namesort descending Modifiers Type Description Overrides
CurrencyAmountFormatter::$description public property The translated human-readable plugin name (optional).
CurrencyAmountFormatter::$id public property The plugin ID.
CurrencyAmountFormatter::$label public property The translated human-readable plugin name.
Plugin::$definition protected property The plugin definition read from the class annotation. 1
Plugin::get public function Gets the value of an annotation. Overrides AnnotationInterface::get 5
Plugin::getClass public function Gets the class of the annotated class. Overrides AnnotationInterface::getClass
Plugin::getId public function Gets the unique ID for this annotated class. Overrides AnnotationInterface::getId
Plugin::getProvider public function Gets the name of the provider of the annotated class. Overrides AnnotationInterface::getProvider
Plugin::parse protected function Parses an annotation into its definition.
Plugin::setClass public function Sets the class of the annotated class. Overrides AnnotationInterface::setClass
Plugin::setProvider public function Sets the name of the provider of the annotated class. Overrides AnnotationInterface::setProvider
Plugin::__construct public function Constructs a Plugin object. 2