You are here

public static function BundleItemOrderItemSubscriber::getSubscribedEvents in Commerce Product Bundle 8

File

src/EventSubscriber/BundleItemOrderItemSubscriber.php, line 27

Class

BundleItemOrderItemSubscriber
Deletes the bundle items order items if an order item gets deleted.

Namespace

Drupal\commerce_product_bundle\EventSubscriber

Code

public static function getSubscribedEvents() {
  $events = [
    'commerce_order.commerce_order_item.insert' => [
      'saveOrderItemBackReference',
      -50,
    ],
    'commerce_order.commerce_order_item.delete' => [
      'deleteBundleItemOrderItem',
      -50,
    ],
  ];
  return $events;
}