menu_firstchild.install in Menu Firstchild 6
Same filename and directory in other branches
Installation file for the menu_firstchild module.
File
menu_firstchild.installView 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
Name | Description |
---|---|
menu_firstchild_install | Implementation of hook_install(). |
menu_firstchild_schema_alter | Implementation of hook_schema_alter(). |
menu_firstchild_uninstall | Implementation of hook_uninstall(). |
menu_firstchild_update_6001 | Implementation of hook_update_N(). |