You are here

vertical_tabs_config.install in Vertical Tabs Config 8

Same filename and directory in other branches
  1. 7 vertical_tabs_config.install

Install and uninstall handling of module.

File

vertical_tabs_config.install
View source
<?php

/**
 * @file
 * Install and uninstall handling of module.
 */

/**
 * Implements hook_install().
 */
function vertical_tabs_config_install() {
  module_set_weight('vertical_tabs_config', 1001);
}

/**
 * Implements hook_schema().
 */
function vertical_tabs_config_schema() {
  $schema = [];
  $schema['vertical_tabs_config'] = [
    'description' => 'Module configuration',
    'fields' => [
      'id' => [
        'description' => 'Primary key: ID de registro.',
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ],
      'vertical_tab' => [
        'description' => 'Vertical tab name',
        'type' => 'text',
        'not null' => TRUE,
      ],
      'content_type' => [
        'description' => 'CT machine name',
        'type' => 'text',
        'not null' => TRUE,
      ],
      'roles' => [
        'description' => 'Roles compressed in json',
        'type' => 'text',
        'not null' => TRUE,
      ],
      'hidden' => [
        'description' => 'Indicates if option is visible or not',
        'type' => 'int',
        'length' => 1,
        'not null' => TRUE,
        'default' => '0',
      ],
    ],
    'primary key' => [
      'id',
    ],
  ];
  return $schema;
}

Functions