function bat_event_entity_bundle_delete in Booking and Availability Management Tools for Drupal 8
Implements hook_entity_bundle_delete().
File
- modules/
bat_event/ bat_event.module, line 861 - Manage Events - Events store the EventValue of a Unit over a period of time.
Code
function bat_event_entity_bundle_delete($entity_type_id, $bundle) {
if ($entity_type_id == 'bat_event') {
$query = \Drupal::entityQuery('bat_event')
->condition('type', $bundle);
$event_ids = $query
->execute();
bat_event_delete_multiple($event_ids);
}
}