You are here

public static function OrderSubscriber::getSubscribedEvents in Commerce License 8.2

File

src/EventSubscriber/OrderSubscriber.php, line 38

Class

OrderSubscriber
Changes a license's state in sync with an order's workflow.

Namespace

Drupal\commerce_license\EventSubscriber

Code

public static function getSubscribedEvents() {
  return [
    OrderEvents::ORDER_PAID => 'onPaid',
    'commerce_order.place.pre_transition' => [
      'onPlace',
      100,
    ],
    // Event for reaching the 'canceled' order state.
    'commerce_order.cancel.post_transition' => [
      'onCancel',
      -100,
    ],
  ];
}