You are here

class PaymentPreRefund in Payment 8.2

Provides an event that is dispatched before a payment is refunded.

Hierarchy

  • class \Drupal\payment\Event\PaymentPreRefund extends \Symfony\Component\EventDispatcher\Event

Expanded class hierarchy of PaymentPreRefund

See also

\Drupal\payment\Event\PaymentEvents::PAYMENT_PRE_REFUND

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

File

src/Event/PaymentPreRefund.php, line 13

Namespace

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

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

  /**-
   * Constructs a new instance.
   *
   * @param \Drupal\payment\Entity\PaymentInterface $payment
   *   The payment that will be refunded.
   *
   * @param \Drupal\Core\Session\AccountInterface
   */
  public function __construct(PaymentInterface $payment) {
    $this->payment = $payment;
  }

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

}

Members

Namesort descending Modifiers Type Description Overrides
PaymentPreRefund::$payment protected property The payment.
PaymentPreRefund::getPayment public function Gets the payment that will be refunded.
PaymentPreRefund::__construct public function