You are here

function quantity_quantity_delete in farmOS 2.x

Implements hook_ENTITY_TYPE_delete().

File

modules/core/quantity/quantity.module, line 141
Quantity module.

Code

function quantity_quantity_delete(QuantityInterface $quantity) {

  // Dispatch an event on quantity delete.
  // @todo Replace this with core event via https://www.drupal.org/node/2551893.
  $event = new QuantityEvent($quantity);
  $event_dispatcher = \Drupal::service('event_dispatcher');
  $event_dispatcher
    ->dispatch(QuantityEvent::DELETE, $event);
}