class PaymentEvent in Commerce Core 8.2
Defines the payment event.
Hierarchy
- class \Drupal\commerce\EventBase extends \Drupal\Component\EventDispatcher\Event
- class \Drupal\commerce_payment\Event\PaymentEvent
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\EventView 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
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PaymentEvent:: |
protected | property | The payment. | |
PaymentEvent:: |
public | function | Gets the payment. | |
PaymentEvent:: |
public | function | Constructs a new PaymentEvent. |