You are here

public function PaymentReferenceBase::__construct in Payment 8.2

Creates 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.

\Symfony\Component\HttpFoundation\RequestStack $request_stack:

\Drupal\Core\Entity\EntityStorageInterface $payment_storage:

\Drupal\Core\StringTranslation\TranslationInterface $string_translation:

\Drupal\Core\Datetime\DateFormatter $date_formatter:

\Drupal\Core\Utility\LinkGeneratorInterface $link_generator:

\Drupal\Core\Render\RendererInterface $renderer:

\Drupal\Core\Session\AccountInterface $current_user:

\Drupal\plugin\Plugin\Plugin\PluginSelector\PluginSelectorManagerInterface $plugin_selector_manager:

\Drupal\plugin\PluginType\PluginTypeInterface $payment_method_type:

\Drupal\Component\Utility\Random $random:

Overrides PluginBase::__construct

1 call to PaymentReferenceBase::__construct()
PaymentReference::__construct in modules/payment_reference/src/Element/PaymentReference.php
Creates a new instance.
1 method overrides PaymentReferenceBase::__construct()
PaymentReference::__construct in modules/payment_reference/src/Element/PaymentReference.php
Creates a new instance.

File

src/Element/PaymentReferenceBase.php, line 132

Class

PaymentReferenceBase
Provides a base for payment reference elements.

Namespace

Drupal\payment\Element

Code

public function __construct(array $configuration, $plugin_id, array $plugin_definition, RequestStack $request_stack, EntityStorageInterface $payment_storage, TranslationInterface $string_translation, DateFormatter $date_formatter, LinkGeneratorInterface $link_generator, RendererInterface $renderer, AccountInterface $current_user, PluginSelectorManagerInterface $plugin_selector_manager, PluginTypeInterface $payment_method_type, Random $random) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->currentUser = $current_user;
  $this->dateFormatter = $date_formatter;
  $this->linkGenerator = $link_generator;
  $this->paymentMethodType = $payment_method_type;
  $this->paymentStorage = $payment_storage;
  $this->pluginSelectorManager = $plugin_selector_manager;
  $this->random = $random;
  $this->renderer = $renderer;
  $this->requestStack = $request_stack;
  $this->stringTranslation = $string_translation;
}