/** * Creates a new instance. * * @param \Drupal\payment\Entity\PaymentInterface * The payment to check execution access for. * @param \Drupal\Core\Session\AccountInterface $account * The account to check payment execution access for. * @param \Drupal\payment\Plugin\Payment\Method\PaymentMethodManagerInterface $payment_method_manager * The payment method manager. * @param \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. */ 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; }