bat_booking.install in Booking and Availability Management Tools for Drupal 8
Same filename and directory in other branches
Install, update and uninstall functions for the BAT Booking module.
File
modules/bat_booking/bat_booking.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the BAT Booking module.
*/
/**
* Implements hook_install().
*/
function bat_booking_install() {
// Create "Standard" booking type.
bat_booking_create_standard_booking_type();
}
/**
* Create "Standard" booking type.
*/
function bat_booking_create_standard_booking_type() {
$booking_type = bat_booking_type_create([
'name' => 'Standard',
'type' => 'standard',
]);
$booking_type
->save();
}
Functions
Name | Description |
---|---|
bat_booking_create_standard_booking_type | Create "Standard" booking type. |
bat_booking_install | Implements hook_install(). |