bat_unit.install in Booking and Availability Management Tools for Drupal 8
Same filename and directory in other branches
Sets up the base table for our entity and a table to store information about the entity types.
File
modules/bat_unit/bat_unit.installView 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
Name | Description |
---|---|
bat_unit_install | Implements hook_install(). |
bat_unit_install_create_default_unit_bundle | Create default unit bundle. |