class OrderEvent in Commerce Core 8.2
Defines the order event.
Hierarchy
- class \Drupal\commerce\EventBase extends \Drupal\Component\EventDispatcher\Event
- class \Drupal\commerce_order\Event\OrderEvent
Expanded class hierarchy of OrderEvent
See also
\Drupal\commerce_order\Event\OrderEvents
7 files declare their use of OrderEvent
- CheckoutEventSubscriber.php in modules/
log/ src/ EventSubscriber/ CheckoutEventSubscriber.php - CheckoutFlowBase.php in modules/
checkout/ src/ Plugin/ Commerce/ CheckoutFlow/ CheckoutFlowBase.php - CheckoutIntegrationTest.php in modules/
log/ tests/ src/ Kernel/ CheckoutIntegrationTest.php - CheckoutSubscriber.php in modules/
checkout/ tests/ modules/ commerce_checkout_test/ src/ EventSubscriber/ CheckoutSubscriber.php - OrderPaidSubscriber.php in modules/
payment/ src/ EventSubscriber/ OrderPaidSubscriber.php
File
- modules/
order/ src/ Event/ OrderEvent.php, line 13
Namespace
Drupal\commerce_order\EventView source
class OrderEvent extends EventBase {
/**
* The order.
*
* @var \Drupal\commerce_order\Entity\OrderInterface
*/
protected $order;
/**
* Constructs a new OrderEvent.
*
* @param \Drupal\commerce_order\Entity\OrderInterface $order
* The order.
*/
public function __construct(OrderInterface $order) {
$this->order = $order;
}
/**
* Gets the order.
*
* @return \Drupal\commerce_order\Entity\OrderInterface
* Gets the order.
*/
public function getOrder() {
return $this->order;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
OrderEvent:: |
protected | property | The order. | |
OrderEvent:: |
public | function | Gets the order. | |
OrderEvent:: |
public | function | Constructs a new OrderEvent. |