private function OrderEventSubscriber::getEventType in Commerce Stock 8
Creates a stock event type object.
Parameters
string $plugin_id: The id of the stock event type.
Return value
\Drupal\commerce_stock\Plugin\Commerce\StockEventType\StockEventTypeInterface The stock event type.
Throws
\Drupal\Component\Plugin\Exception\PluginException
6 calls to OrderEventSubscriber::getEventType()
- OrderEventSubscriber::onOrderCancel in src/
EventSubscriber/ OrderEventSubscriber.php - Performs a stock transaction for an order Cancel event.
- OrderEventSubscriber::onOrderDelete in src/
EventSubscriber/ OrderEventSubscriber.php - Performs a stock transaction on an order delete event.
- OrderEventSubscriber::onOrderItemDelete in src/
EventSubscriber/ OrderEventSubscriber.php - Performs a stock transaction when an order item is deleted.
- OrderEventSubscriber::onOrderItemUpdate in src/
EventSubscriber/ OrderEventSubscriber.php - Performs a stock transaction on an order item update.
- OrderEventSubscriber::onOrderPlace in src/
EventSubscriber/ OrderEventSubscriber.php - Creates a stock transaction when an order is placed.
File
- src/
EventSubscriber/ OrderEventSubscriber.php, line 381
Class
- OrderEventSubscriber
- Performs stock transactions on order and order item events.
Namespace
Drupal\commerce_stock\EventSubscriberCode
private function getEventType($plugin_id) {
return $this->eventTypeManager
->createInstance($plugin_id);
}