You are here

function megamenu_schema in Megamenu 7

Same name and namespace in other branches
  1. 6.2 megamenu.install \megamenu_schema()
  2. 6 megamenu.install \megamenu_schema()

Implements hook_schema().

File

./megamenu.install, line 20
Installation related functions.

Code

function megamenu_schema() {
  $schema['megamenu'] = array(
    'description' => 'Stores the enabled state and other attributes of mega menus.',
    'fields' => array(
      'menu_name' => array(
        'description' => 'The name of a Drupal menu and corresponding mega menu',
        'type' => 'varchar',
        'length' => '32',
        'not null' => TRUE,
        'default' => '',
      ),
      'enabled' => array(
        'description' => 'Enabled state of a mega menu: 1 = enabled, 0 = dissabled',
        'type' => 'int',
        'unsigned' => FALSE,
        'size' => 'tiny',
        'default' => 0,
      ),
      'skin' => array(
        'description' => 'Name of skin (CSS class)',
        'type' => 'varchar',
        'length' => '32',
        'not null' => TRUE,
        'default' => 'friendly',
      ),
      'menu_orientation' => array(
        'description' => 'Orientation of the entire menu (horizontal or vertical)',
        'type' => 'varchar',
        'length' => '12',
        'not null' => TRUE,
        'default' => 'horizontal',
      ),
      'slot_orientation' => array(
        'description' => 'Orientation CSS class to apply to slots (stacking or columnar)',
        'type' => 'varchar',
        'length' => '32',
        'not null' => TRUE,
        'default' => 'columnar',
      ),
      'slot_attributes' => array(
        'description' => 'Custom CSS classes to apply to slots',
        'type' => 'text',
        'size' => 'small',
        'not null' => FALSE,
      ),
    ),
    'primary key' => array(
      'menu_name',
    ),
  );
  return $schema;
}