You are here

function bat_booking_entity_insert in Booking and Availability Management Tools for Drupal 8

Same name and namespace in other branches
  1. 7 modules/bat_booking/bat_booking.module \bat_booking_entity_insert()

Implements hook_entity_insert().

File

modules/bat_booking/bat_booking.module, line 351

Code

function bat_booking_entity_insert(EntityInterface $entity) {
  if ($entity
    ->bundle() == 'bat_booking_bundle') {
    bat_booking_add_start_date_field($entity
      ->id());
    bat_booking_add_end_date_field($entity
      ->id());
    bat_booking_add_event_reference_field($entity
      ->id());
  }
}