You are here

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

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

Sets up the base table for our entity and a table to store information about the entity types.

File

modules/bat_unit/bat_unit.install
View source
<?php

/**
 * @file
 * Sets up the base table for our entity and a table to store information about
 * the entity types.
 */

/**
 * Implements hook_install().
 */
function bat_unit_install() {
  bat_unit_install_create_default_unit_bundle();
}

/**
 * Create default unit bundle.
 */
function bat_unit_install_create_default_unit_bundle() {
  $default_unit_bundle = bat_unit_bundle_create([
    'type' => 'default',
    'name' => 'Default',
  ]);
  $default_unit_bundle
    ->save();
}

Functions

Namesort descending Description
bat_unit_install Implements hook_install().
bat_unit_install_create_default_unit_bundle Create default unit bundle.