public function Amount::__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 $string_translation: The string translator.
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.
\Drupal\Core\Render\RendererInterface: The renderer.
\Drupal\Core\Entity\EntityStorageInterface $currency_storage: THe currency storage.
Overrides HandlerBase::__construct
File
- src/
Plugin/ views/ field/ Amount.php, line 55
Class
- Amount
- A Views field handler for currency amounts.
Namespace
Drupal\currency\Plugin\views\fieldCode
public function __construct(array $configuration, $plugin_id, array $plugin_definition, TranslationInterface $string_translation, ModuleHandlerInterface $module_handler, RendererInterface $renderer, EntityStorageInterface $currency_storage) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->definition += $this
->defaultDefinition();
$this->currencyStorage = $currency_storage;
$this->moduleHandler = $module_handler;
$this->renderer = $renderer;
$this->stringTranslation = $string_translation;
}