You are here

function bat_booking_example_create_availability_event_type in Booking and Availability Management Tools for Drupal 7

Same name and namespace in other branches
  1. 8 modules/bat_booking/bat_booking_example/bat_booking_example.install \bat_booking_example_create_availability_event_type()

Create the "Availability Example" event type.

1 call to bat_booking_example_create_availability_event_type()
bat_booking_example_install in modules/bat_booking/bat_booking_example/bat_booking_example.install
Implements hook_install().

File

modules/bat_booking/bat_booking_example/bat_booking_example.install, line 25

Code

function bat_booking_example_create_availability_event_type() {
  $event = new BatEventType(array(
    'label' => 'Availability Example',
    'type' => 'availability_example',
    'fixed_event_states' => 1,
    'event_granularity' => 'bat_daily',
    'target_entity_type' => 'bat_unit',
  ));
  bat_event_type_save($event);
}