You are here

class PaymentEvent in Commerce Core 8.2

Defines the payment event.

Hierarchy

  • class \Drupal\commerce\EventBase extends \Drupal\Component\EventDispatcher\Event

Expanded class hierarchy of PaymentEvent

See also

\Drupal\commerce_payment\Event\PaymentEvents

1 file declares its use of PaymentEvent
commerce_payment.install in modules/payment/commerce_payment.install
Install, update and uninstall functions for the commerce_payment module.

File

modules/payment/src/Event/PaymentEvent.php, line 13

Namespace

Drupal\commerce_payment\Event
View source
class PaymentEvent extends EventBase {

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

  /**
   * Constructs a new PaymentEvent.
   *
   * @param \Drupal\commerce_payment\Entity\PaymentInterface $payment
   *   The payment.
   */
  public function __construct(PaymentInterface $payment) {
    $this->payment = $payment;
  }

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

}

Members

Namesort descending Modifiers Type Description Overrides
PaymentEvent::$payment protected property The payment.
PaymentEvent::getPayment public function Gets the payment.
PaymentEvent::__construct public function Constructs a new PaymentEvent.