You are here

bat_booking.install in Booking and Availability Management Tools for Drupal 8

Same filename and directory in other branches
  1. 7 modules/bat_booking/bat_booking.install

Install, update and uninstall functions for the BAT Booking module.

File

modules/bat_booking/bat_booking.install
View 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

Namesort descending Description
bat_booking_create_standard_booking_type Create "Standard" booking type.
bat_booking_install Implements hook_install().