mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-09 19:18:22 +01:00
New: Ajout du module source dans menus. Ceci permettra aux modules d'ajouter leurs propres entrees aux menus.
This commit is contained in:
@@ -51,6 +51,8 @@ class modMyModule extends DolibarrModules
|
||||
// Id for module (must be unique).
|
||||
// Use here a free id (See in Home -> System information -> Dolibarr for list of used module id).
|
||||
$this->numero = 10000;
|
||||
// Key text used to identify module (for permission, menus, etc...)
|
||||
$this->rights_class = 'mymodule';
|
||||
|
||||
// Family can be 'crm','financial','hr','projects','product','technic','other'
|
||||
// It is used to group modules in module setup page
|
||||
@@ -73,7 +75,7 @@ class modMyModule extends DolibarrModules
|
||||
$this->dirs = array();
|
||||
|
||||
// Config pages. Put here list of php page names stored in admmin directory used to setup module
|
||||
$this->config_page_url = array("webcalendar.php");
|
||||
$this->config_page_url = array("mymodulesetuppage.php");
|
||||
|
||||
// Dependencies
|
||||
$this->depends = array(); // List of modules id that must be enabled if this module is enabled
|
||||
@@ -94,7 +96,6 @@ class modMyModule extends DolibarrModules
|
||||
//$r++;
|
||||
|
||||
// Permissions
|
||||
$this->rights_class = 'webcal'; // Permission key
|
||||
$this->rights = array(); // Permission array used by this module
|
||||
|
||||
// Add here list of permission defined by an id, a label, a boolean and two constant strings.
|
||||
@@ -106,26 +107,20 @@ class modMyModule extends DolibarrModules
|
||||
// $this->rights[$r][4] = 'level1'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
// $this->rights[$r][5] = 'level2'; // In php code, permission will be checked by test if ($user->rights->permkey->level1->level2)
|
||||
|
||||
$this->rights_class = 'webcal'; // Permission key
|
||||
$this->rights = array(); // Permission array used by this module
|
||||
|
||||
// Main menu entries
|
||||
$this->menus = array(); // List of menus to add
|
||||
$r=0;
|
||||
|
||||
// Example:
|
||||
// $r++;
|
||||
// insert into `llx_menu` (
|
||||
// menu_handler 'all' // Menu handler name (all to add with all menu handlers)
|
||||
// type 'top' // Menu top or left
|
||||
// `mainmenu`, 'webcal' // Name family/module (home, companies, ...)
|
||||
// `mainmenu`, 'mymodule' // Name family/module (home, companies, ...)
|
||||
// `fk_menu`, 0 // 0 or Id of mother menu line
|
||||
// `order` 10 // Order of entry
|
||||
// `url`, '/webcal/webcal.php?mainmenu=webcal&leftmenu=' // Relative (or absolute) url to go
|
||||
// `position` 100 // Order of entry
|
||||
// `url`, '/myurl' // Relative (or absolute) url to go
|
||||
// `target`, '' // Target of Url link
|
||||
// `titre`, 'Calendar' // Key for menu translation
|
||||
// `langs`, other // Lang file to load for translation
|
||||
// `level`, -1 // deprecated
|
||||
// `titre`, 'MyMenu' // Key for menu translation
|
||||
// `langs`, 'other' // Lang file to load for translation
|
||||
// `leftmenu`, '' // Condition to compare to $_REQUEST["leftmenu"] to show or hide menu entry
|
||||
// `right`, '' // Condition to show enabled or disabled menu entry
|
||||
// `user`, 0 // 0 if menu for all users, 1 for external only, 2 for internal only
|
||||
|
||||
Reference in New Issue
Block a user