You are here

advanced_menu_menu_admin.install in Advanced Menu 7

Same filename and directory in other branches
  1. 6.x menu_admin/advanced_menu_menu_admin.install

File

menu_admin/advanced_menu_menu_admin.install
View source
<?php

// $Id: $

/**
 * Implementation of hook_install().
 */
function advanced_menu_menu_admin_install() {
  db_update('system')
    ->fields(array(
    'weight' => 1,
  ))
    ->condition('name', 'advanced_menu_menu_admin')
    ->condition('type', 'module')
    ->execute();
}

/**
 * Implementation of hook_schema().
 */
function advanced_menu_menu_admin_schema() {
  $schema['advanced_menu_menu_admin_roles'] = array(
    'description' => t('Holds permission data for menus'),
    'fields' => array(
      'aid' => array(
        'type' => 'serial',
        'not null' => TRUE,
        'description' => t('Primary Key: Unique access ID.'),
      ),
      'menu_name' => array(
        'type' => 'varchar',
        'length' => 32,
        'not null' => TRUE,
        'default' => '',
        'description' => t('The {menu_custom}.menu_name of the menu.'),
      ),
      'rid' => array(
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
        'default' => 0,
        'description' => t('The {role}.rid to which the permissions are assigned.'),
      ),
    ),
    'primary key' => array(
      'aid',
    ),
  );
  return $schema;
}

Functions

Namesort descending Description
advanced_menu_menu_admin_install Implementation of hook_install().
advanced_menu_menu_admin_schema Implementation of hook_schema().