You are here

function bat_unit_install_create_default_unit_bundle in Booking and Availability Management Tools for Drupal 8

Same name and namespace in other branches
  1. 7 modules/bat_unit/bat_unit.install \bat_unit_install_create_default_unit_bundle()

Create default unit bundle.

1 call to bat_unit_install_create_default_unit_bundle()
bat_unit_install in modules/bat_unit/bat_unit.install
Implements hook_install().

File

modules/bat_unit/bat_unit.install, line 19
Sets up the base table for our entity and a table to store information about the entity types.

Code

function bat_unit_install_create_default_unit_bundle() {
  $default_unit_bundle = bat_unit_bundle_create([
    'type' => 'default',
    'name' => 'Default',
  ]);
  $default_unit_bundle
    ->save();
}