You are here

public function PaymentMethodBase::__construct in Payment 8.2

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\Extension\ModuleHandlerInterface $module_handler: The module handler.

\Drupal\payment\EventDispatcherInterface $event_dispatcher: The event dispatcher.

\Drupal\Core\Utility\Token $token: The token API.

\Drupal\payment\Plugin\Payment\Status\PaymentStatusManagerInterface: The payment status manager.

Overrides PluginBase::__construct

1 call to PaymentMethodBase::__construct()
Basic::__construct in src/Plugin/Payment/Method/Basic.php
Constructs a new instance.
1 method overrides PaymentMethodBase::__construct()
Basic::__construct in src/Plugin/Payment/Method/Basic.php
Constructs a new instance.

File

src/Plugin/Payment/Method/PaymentMethodBase.php, line 75

Class

PaymentMethodBase
A base payment method plugin.

Namespace

Drupal\payment\Plugin\Payment\Method

Code

public function __construct(array $configuration, $plugin_id, array $plugin_definition, ModuleHandlerInterface $module_handler, EventDispatcherInterface $event_dispatcher, Token $token, PaymentStatusManagerInterface $payment_status_manager) {
  $configuration += $this
    ->defaultConfiguration();
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->eventDispatcher = $event_dispatcher;
  $this->moduleHandler = $module_handler;
  $this->paymentStatusManager = $payment_status_manager;
  $this->token = $token;
}