You are here

class OrderEvent in Commerce Core 8.2

Defines the order event.

Hierarchy

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

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

... See full list

File

modules/order/src/Event/OrderEvent.php, line 13

Namespace

Drupal\commerce_order\Event
View 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

Namesort descending Modifiers Type Description Overrides
OrderEvent::$order protected property The order.
OrderEvent::getOrder public function Gets the order.
OrderEvent::__construct public function Constructs a new OrderEvent.