mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-31 22:22:28 +01:00
Fix: example
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -18,19 +18,18 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
* \defgroup mymodule Module MyModule
|
||||
* \brief Example of a module descriptor.
|
||||
* Such a file must be copied into htdocs/mymodule/core/modules directory.
|
||||
* \file htdocs/mymodule/core/modules/modMyModule.class.php
|
||||
* \ingroup mymodule
|
||||
* \brief Description and activation file for module MyModule
|
||||
* \defgroup mymodule Module MyModule
|
||||
* \brief Example of a module descriptor.
|
||||
* Such a file must be copied into htdocs/mymodule/core/modules directory.
|
||||
* \file htdocs/mymodule/core/modules/modMyModule.class.php
|
||||
* \ingroup mymodule
|
||||
* \brief Description and activation file for module MyModule
|
||||
*/
|
||||
include_once(DOL_DOCUMENT_ROOT ."/core/modules/DolibarrModules.class.php");
|
||||
|
||||
|
||||
/**
|
||||
* \class modMyModule
|
||||
* \brief Description and activation class for module MyModule
|
||||
* Description and activation class for module MyModule
|
||||
*/
|
||||
class modMyModule extends DolibarrModules
|
||||
{
|
||||
@@ -172,46 +171,46 @@ class modMyModule extends DolibarrModules
|
||||
// Add here entries to declare new menus
|
||||
//
|
||||
// Example to declare a new Top Menu entry and its Left menu entry:
|
||||
// $this->menu[$r]=array( 'fk_menu'=>0, // Put 0 if this is a top menu
|
||||
// 'type'=>'top', // This is a Top menu entry
|
||||
// $this->menu[$r]=array( 'fk_menu'=>0, // Put 0 if this is a top menu
|
||||
// 'type'=>'top', // This is a Top menu entry
|
||||
// 'titre'=>'MyModule top menu',
|
||||
// 'mainmenu'=>'mymodule',
|
||||
// 'leftmenu'=>'mymodule',
|
||||
// 'url'=>'/mymodule/pagetop.php',
|
||||
// 'langs'=>'mylangfile', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
// 'langs'=>'mylangfile', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
// 'position'=>100,
|
||||
// 'enabled'=>'1', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled.
|
||||
// 'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
||||
// 'enabled'=>'$conf->mymodule->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled.
|
||||
// 'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
||||
// 'target'=>'',
|
||||
// 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
||||
// 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
||||
// $r++;
|
||||
// $this->menu[$r]=array( 'fk_menu'=>'r=0', // Use r=value where r is index key used for the parent menu entry (higher parent must be a top menu entry)
|
||||
// 'type'=>'left', // This is a Left menu entry
|
||||
// $this->menu[$r]=array( 'fk_menu'=>'r=0', // Use r=value where r is index key used for the parent menu entry (higher parent must be a top menu entry)
|
||||
// 'type'=>'left', // This is a Left menu entry
|
||||
// 'titre'=>'MyModule left menu',
|
||||
// 'mainmenu'=>'mymodule',
|
||||
// 'leftmenu'=>'mymodule',
|
||||
// 'url'=>'/mymodule/pagelevel1.php',
|
||||
// 'langs'=>'mylangfile', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
// 'langs'=>'mylangfile', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
// 'position'=>100,
|
||||
// 'enabled'=>'1', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled.
|
||||
// 'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
||||
// 'enabled'=>'$conf->mymodule->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled.
|
||||
// 'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
||||
// 'target'=>'',
|
||||
// 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
||||
// 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
||||
// $r++;
|
||||
//
|
||||
// Example to declare a Left Menu entry into an existing Top menu entry:
|
||||
// $this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=mainmenucode', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy'
|
||||
// 'type'=>'left', // This is a Left menu entry
|
||||
// $this->menu[$r]=array( 'fk_menu'=>'fk_mainmenu=mainmenucode', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy'
|
||||
// 'type'=>'left', // This is a Left menu entry
|
||||
// 'titre'=>'MyModule left menu',
|
||||
// 'mainmenu'=>'mainmenucode',
|
||||
// 'leftmenu'=>'mymodule',
|
||||
// 'url'=>'/mymodule/pagelevel2.php',
|
||||
// 'langs'=>'mylangfile', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
// 'langs'=>'mylangfile', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
// 'position'=>100,
|
||||
// 'enabled'=>'1', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
|
||||
// 'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
||||
// 'enabled'=>'$conf->mymodule->enabled', // Define condition to show or hide menu entry. Use '$conf->mymodule->enabled' if entry must be visible if module is enabled. Use '$leftmenu==\'system\'' to show if leftmenu system is selected.
|
||||
// 'perms'=>'1', // Use 'perms'=>'$user->rights->mymodule->level1->level2' if you want your menu with a permission rules
|
||||
// 'target'=>'',
|
||||
// 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
||||
// 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
||||
// $r++;
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user