You are here

class PaymentTypePreResumeContext in Payment 8.2

Provides an event that is dispatched before the payment type's original context is resumed.

Hierarchy

Expanded class hierarchy of PaymentTypePreResumeContext

See also

\Drupal\payment\Event\PaymentEvents::PAYMENT_TYPE_PRE_RESUME_CONTEXT

4 files declare their use of PaymentTypePreResumeContext
EventDispatcherCollectionTest.php in tests/src/Unit/EventDispatcherCollectionTest.php
PaymentTypePreResumeContextTest.php in tests/src/Unit/Event/PaymentTypePreResumeContextTest.php
SymfonyEventDispatcher.php in src/SymfonyEventDispatcher.php
SymfonyEventDispatcherTest.php in tests/src/Unit/SymfonyEventDispatcherTest.php

File

src/Event/PaymentTypePreResumeContext.php, line 14

Namespace

Drupal\payment\Event
View source
class PaymentTypePreResumeContext extends Event {

  /**
   * The payment.
   *
   * @var \Drupal\payment\Entity\PaymentInterface
   */
  protected $payment;

  /**-
   * Constructs a new instance.
   *
   * @param \Drupal\payment\Entity\PaymentInterface $payment
   *   The payment for which the context will be resumed
   */
  public function __construct(PaymentInterface $payment) {
    $this->payment = $payment;
  }

  /**
   * Gets the payment for which the context will be resumed.
   *
   * @return \Drupal\payment\Entity\PaymentInterface
   */
  public function getPayment() {
    return $this->payment;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PaymentTypePreResumeContext::$payment protected property The payment.
PaymentTypePreResumeContext::getPayment public function Gets the payment for which the context will be resumed.
PaymentTypePreResumeContext::__construct public function