You are here

private static function CoreStockEvents::getEventTypeMap in Commerce Stock 8

Get the map of StockEvenTypes.

2 calls to CoreStockEvents::getEventTypeMap()
CoreStockEvents::mapStockEventIds in src/Plugin/StockEvents/CoreStockEvents.php
To ensure backwards compatibility we introduced StockEventTypes plugins without changing the StockEventsInterface. This functions maps the interface constants to StockEventTypes.
CoreStockEvents::mapStockEventTypes in src/Plugin/StockEvents/CoreStockEvents.php
To ensure backwards compatibility we introduced StockEventTypes plugins without changing the StockEventsInterface. This functions maps the interface constants to StockEventTypes.

File

src/Plugin/StockEvents/CoreStockEvents.php, line 136

Class

CoreStockEvents
Core Stock Events.

Namespace

Drupal\commerce_stock\Plugin\StockEvents

Code

private static function getEventTypeMap() {
  return $map = [
    StockEventsInterface::ORDER_PLACE_EVENT => 'commerce_stock_order_place',
    StockEventsInterface::ORDER_UPDATE_EVENT => 'commerce_stock_order_update',
    StockEventsInterface::ORDER_CANCEL_EVENT => 'commerce_stock_order_cancel',
    StockEventsInterface::ORDER_DELET_EVENT => 'commerce_stock_order_delete',
    StockEventsInterface::ORDER_ITEM_DELETE_EVENT => 'commerce_stock_order_item_delete',
    StockEventsInterface::ORDER_ITEM_UPDATE_EVENT => 'commerce_stock_order_item_update',
  ];
}