You are here

menu_icons.install in Menu Icons 6

Same filename and directory in other branches
  1. 8 menu_icons.install
  2. 6.2 menu_icons.install
  3. 7.3 menu_icons.install

Install file for menu_icons

@author dylan@opensourcery.com

File

menu_icons.install
View source
<?php

/**
 * @file
 * Install file for menu_icons
 * 
 * @author dylan@opensourcery.com
 */

/**
 * Implementation of hook_schema()
 *
 */
function menu_icons_schema() {
  $schema['menu_icons'] = array(
    'description' => t('Table linking image paths with menu items.'),
    'fields' => array(
      'mlid' => array(
        'description' => 'The menu ID',
        'type' => 'int',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
      'path' => array(
        'description' => 'The path to the icon',
        'type' => 'varchar',
        'length' => 255,
        'not null' => TRUE,
      ),
    ),
    'unique keys' => array(
      'mlid' => array(
        'mlid',
      ),
    ),
  );
  return $schema;
}

/**
 * Implementation of hook_install()
 *
 */
function menu_icons_install() {
  $result = drupal_install_schema('menu_icons');
}

/**
 * Implementation of hook_uninstall()
 *
 */
function menu_icons_uninstall() {
  drupal_uninstall_schema('menu_icons');
  variable_del('menu_icons_default_icon');
}

Functions

Namesort descending Description
menu_icons_install Implementation of hook_install()
menu_icons_schema Implementation of hook_schema()
menu_icons_uninstall Implementation of hook_uninstall()