public function Basic::__construct in Currency 8.3
Constructs a new instance.
Parameters
mixed[] $configuration: A configuration array containing information about the plugin instance.
string $plugin_id: The plugin_id for the plugin instance.
mixed[] $plugin_definition: The plugin implementation definition.
\Drupal\Core\StringTranslation\TranslationInterface $translation_manager: The translation manager.
\Drupal\currency\LocaleResolverInterface $locale_delegator: The locale delegator.
Overrides PluginBase::__construct
File
- src/
Plugin/ Currency/ AmountFormatter/ Basic.php, line 45
Class
- Basic
- Formats amounts using string translation and number_format().
Namespace
Drupal\currency\Plugin\Currency\AmountFormatterCode
public function __construct(array $configuration, $plugin_id, array $plugin_definition, TranslationInterface $translation_manager, LocaleResolverInterface $locale_delegator) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->localeDelegator = $locale_delegator;
$this->stringTranslation = $translation_manager;
}