mirror of
https://github.com/pluginsGLPI/example.git
synced 2025-06-28 06:58:43 +02:00
[0.85] update for new menu management
git-svn-id: https://forge.glpi-project.org/svn/example/trunk@214 349b9182-4a13-0410-896f-e5e9767dd1b3
This commit is contained in:
22
setup.php
22
setup.php
@ -58,15 +58,19 @@ function plugin_init_example() {
|
||||
|
||||
// Display a menu entry ?
|
||||
if (isset($_SESSION["glpi_plugin_example_profile"])) { // Right set in change_profile hook
|
||||
$PLUGIN_HOOKS['menu_entry']['example'] = 'front/example.php';
|
||||
|
||||
$PLUGIN_HOOKS['submenu_entry']['example']['options']['optionname']['title'] = "Search";
|
||||
$PLUGIN_HOOKS['submenu_entry']['example']['options']['optionname']['page'] = '/plugins/example/front/example.php';
|
||||
$PLUGIN_HOOKS['submenu_entry']['example']['options']['optionname']['links']['search'] = '/plugins/example/front/example.php';
|
||||
$PLUGIN_HOOKS['submenu_entry']['example']['options']['optionname']['links']['add'] = '/plugins/example/front/example.form.php';
|
||||
$PLUGIN_HOOKS['submenu_entry']['example']['options']['optionname']['links']['config'] = '/plugins/example/index.php';
|
||||
$PLUGIN_HOOKS['submenu_entry']['example']['options']['optionname']['links']["<img src='".$CFG_GLPI["root_doc"]."/pics/menu_showall.png' title='".__s('Show all')."' alt='".__s('Show all')."'>"] = '/plugins/example/index.php';
|
||||
$PLUGIN_HOOKS['submenu_entry']['example']['options']['optionname']['links'][__s('Test link', 'example')] = '/plugins/example/index.php';
|
||||
$PLUGIN_HOOKS['menu_toadd']['example'] = array('plugins' => 'PluginExampleExample',
|
||||
'utils' => 'PluginExampleExample');
|
||||
|
||||
// Old menu style
|
||||
// $PLUGIN_HOOKS['menu_entry']['example'] = 'front/example.php';
|
||||
//
|
||||
// $PLUGIN_HOOKS['submenu_entry']['example']['options']['optionname']['title'] = "Search";
|
||||
// $PLUGIN_HOOKS['submenu_entry']['example']['options']['optionname']['page'] = '/plugins/example/front/example.php';
|
||||
// $PLUGIN_HOOKS['submenu_entry']['example']['options']['optionname']['links']['search'] = '/plugins/example/front/example.php';
|
||||
// $PLUGIN_HOOKS['submenu_entry']['example']['options']['optionname']['links']['add'] = '/plugins/example/front/example.form.php';
|
||||
// $PLUGIN_HOOKS['submenu_entry']['example']['options']['optionname']['links']['config'] = '/plugins/example/index.php';
|
||||
// $PLUGIN_HOOKS['submenu_entry']['example']['options']['optionname']['links']["<img src='".$CFG_GLPI["root_doc"]."/pics/menu_showall.png' title='".__s('Show all')."' alt='".__s('Show all')."'>"] = '/plugins/example/index.php';
|
||||
// $PLUGIN_HOOKS['submenu_entry']['example']['options']['optionname']['links'][__s('Test link', 'example')] = '/plugins/example/index.php';
|
||||
|
||||
$PLUGIN_HOOKS["helpdesk_menu_entry"]['example'] = true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user