You are here

menu_firstchild.install in Menu Firstchild 6

Same filename and directory in other branches
  1. 7 menu_firstchild.install

Installation file for the menu_firstchild module.

File

menu_firstchild.install
View source
<?php

/**
 * @file
 * Installation file for the menu_firstchild module.
 */

/**
 * Implementation of hook_install().
 */
function menu_firstchild_install() {
  $ret = array();

  // Add custom index to menu_links table.
  db_add_index($ret, 'menu_links', 'plid', array(
    'plid',
  ));
}

/**
 * Implementation of hook_uninstall().
 */
function menu_firstchild_uninstall() {
  $ret = array();

  // Drop custom index.
  db_drop_index($ret, 'menu_links', 'plid');
}

/**
 * Implementation of hook_schema_alter().
 */
function menu_firstchild_schema_alter(&$schema) {

  // Add index for plid to {menu_links}.
  $schema['menu_links']['indexes']['plid'] = array(
    'plid',
  );
}

/**
 * Implementation of hook_update_N().
 */
function menu_firstchild_update_6001() {
  $ret = array();

  // Add custom index to menu_links table.
  db_add_index($ret, 'menu_links', 'plid', array(
    'plid',
  ));
  return $ret;
}

Functions