You are here

public function PaymentExecutionPaymentMethodManager::__construct in Payment 8.2

Creates a new instance.

Parameters

\Drupal\payment\Entity\PaymentInterface: The payment to check execution access for.

\Drupal\Core\Session\AccountInterface $account: The account to check payment execution access for.

\Drupal\payment\Plugin\Payment\Method\PaymentMethodManagerInterface $payment_method_manager: The payment method manager.

\Drupal\Component\Plugin\Discovery\DiscoveryInterface|null $discovery: A plugin discovery to use instead of the decorated plugin manager, or NULL to use the decorated plugin manager.

Overrides PaymentAwarePluginManagerDecorator::__construct

File

src/Plugin/Payment/Method/PaymentExecutionPaymentMethodManager.php, line 49

Class

PaymentExecutionPaymentMethodManager
Provides a payment method manager for executing a payment.

Namespace

Drupal\payment\Plugin\Payment\Method

Code

public function __construct(PaymentInterface $payment, AccountInterface $account, PaymentMethodManagerInterface $payment_method_manager, DiscoveryInterface $discovery = NULL) {
  parent::__construct($payment, $payment_method_manager, $discovery);
  $this->account = $account;
  $this->decoratedPaymentMethodManager = $payment_method_manager;
}