You are here

menu_per_role.install in Menu Per Role 7

Same filename and directory in other branches
  1. 8 menu_per_role.install
  2. 5 menu_per_role.install
  3. 6 menu_per_role.install

Install, update and uninstall functions for the menu_per_role module.

File

menu_per_role.install
View source
<?php

/**
 * @file
 * Install, update and uninstall functions for the menu_per_role module.
 */

/**
 * Implements hook_schema().
 */
function menu_per_role_schema() {
  $schema['menu_per_role'] = array(
    'fields' => array(
      'mlid' => array(
        'description' => 'The menu identifier.',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'rids' => array(
        'description' => 'The role identifiers separated by commas. Show to those roles.',
        'type' => 'text',
        'not null' => TRUE,
      ),
      'hrids' => array(
        'description' => 'The role identifiers separated by commas. Hide from those roles.',
        'type' => 'text',
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'mlid',
    ),
    'foreign keys' => array(
      'mlid' => array(
        'table' => 'menu',
        'columns' => array(
          'mlid' => 'mlid',
        ),
      ),
    ),
  );
  return $schema;
}

Functions

Namesort descending Description
menu_per_role_schema Implements hook_schema().