From b487644cb76739ff8da5ac8af22ea696f07d571f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Sat, 6 Feb 2021 10:52:03 +0100 Subject: [PATCH] sample use for margin module --- htdocs/core/modules/modMargin.class.php | 26 +++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/htdocs/core/modules/modMargin.class.php b/htdocs/core/modules/modMargin.class.php index 3051b68f570..e62e97363c6 100644 --- a/htdocs/core/modules/modMargin.class.php +++ b/htdocs/core/modules/modMargin.class.php @@ -104,18 +104,20 @@ class modMargin extends DolibarrModules // left menu entry $this->menu[$r] = array( - 'fk_menu'=>'fk_mainmenu=billing', // Put 0 if this is a top menu - 'type'=>'left', // This is a Top menu entry - 'titre'=>'Margins', - 'mainmenu'=>'billing', - 'leftmenu'=>'margins', - 'url'=>'/margin/index.php', - 'langs'=>'margins', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. - 'position'=>100, - 'enabled'=>'$conf->margin->enabled', // Define condition to show or hide menu entry. Use '$conf->monmodule->enabled' if entry must be visible if module is enabled. - 'perms'=>'$user->rights->margins->liretous', // Use 'perms'=>'$user->rights->monmodule->level1->level2' if you want your menu with a permission rules - 'target'=>'', - 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both + 'fk_menu'=>'fk_mainmenu=billing', // Put 0 if this is a top menu + 'type'=>'left', // This is a Top menu entry + 'titre'=>'Margins', + 'prefix' => '', + 'mainmenu'=>'billing', + 'leftmenu'=>'margins', + 'url'=>'/margin/index.php', + 'langs'=>'margins', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory. + 'position'=>100, + 'enabled'=>'$conf->margin->enabled', // Define condition to show or hide menu entry. Use '$conf->monmodule->enabled' if entry must be visible if module is enabled. + 'perms'=>'$user->rights->margins->liretous', // Use 'perms'=>'$user->rights->monmodule->level1->level2' if you want your menu with a permission rules + 'target'=>'', + 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both + ); $r++; // Permissions