menu_per_role.install in Menu Per Role 7
Same filename and directory in other branches
Install, update and uninstall functions for the menu_per_role module.
File
menu_per_role.installView 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
Name | Description |
---|---|
menu_per_role_schema | Implements hook_schema(). |