dolibarr 25.0.0-alpha
MenuManager Class Reference

Class to manage menu Auguria. More...

Public Member Functions

 __construct ($db, $type_user)
 Constructor.
 
 loadMenu ($forcemainmenu='', $forceleftmenu='')
 Load this->tabMenu.
 
 showmenu ($mode, $moredata=null)
 Output menu on screen.
 
 __construct ($db, $type_user)
 Constructor.
 
 loadMenu ($forcemainmenu='', $forceleftmenu='')
 Load this->tabMenu.
 
 showmenu ($mode, $moredata=null)
 Output menu on screen.
 
 __construct ($db, $type_user)
 Constructor.
 
 loadMenu ($forcemainmenu='', $forceleftmenu='')
 Load this->tabMenu.
 
 showmenu ($mode, $moredata=null)
 Output menu on screen.
 

Private Member Functions

 getUrlToCompare ($url)
 Return an url of menu in a canonical form to compare it with another one: parameters mainmenu, leftmenu and idmenu (added on entries loaded from database) are removed and other parameters are sorted, so their order does not matter.
 

Detailed Description

Class to manage menu Auguria.

Class to manage menu Empty.

Class to manage menu Eldy.

@phan-suppress PhanRedefineClass

Definition at line 33 of file auguria_menu.php.

Constructor & Destructor Documentation

◆ __construct() [1/3]

MenuManager::__construct ( $db,
$type_user )

Constructor.

Parameters
DoliDB$dbDatabase handler
int<0,1>$type_user Type of user

Definition at line 81 of file auguria_menu.php.

◆ __construct() [2/3]

MenuManager::__construct ( $db,
$type_user )

Constructor.

Parameters
DoliDB$dbDatabase handler
int<0,1>$type_user Type of user

Definition at line 80 of file eldy_menu.php.

◆ __construct() [3/3]

MenuManager::__construct ( $db,
$type_user )

Constructor.

Parameters
DoliDB$dbDatabase handler
int<0,1>$type_user Type of user

Definition at line 81 of file empty.php.

Member Function Documentation

◆ getUrlToCompare()

MenuManager::getUrlToCompare ( $url)
private

Return an url of menu in a canonical form to compare it with another one: parameters mainmenu, leftmenu and idmenu (added on entries loaded from database) are removed and other parameters are sorted, so their order does not matter.

Parameters
string$urlUrl of menu entry (example: '/compta/facture/list.php?leftmenu=customers_bills&search_status=0')
Returns
string Canonical url (example: '/compta/facture/list.php?search_status=0')

Definition at line 452 of file eldy_menu.php.

Referenced by showmenu().

◆ loadMenu() [1/3]

MenuManager::loadMenu ( $forcemainmenu = '',
$forceleftmenu = '' )

Load this->tabMenu.

Parameters
string$forcemainmenuTo force mainmenu to load
string$forceleftmenuTo force leftmenu to load
Returns
void

Definition at line 95 of file auguria_menu.php.

References GETPOST(), GETPOSTINT(), and GETPOSTISSET().

◆ loadMenu() [2/3]

MenuManager::loadMenu ( $forcemainmenu = '',
$forceleftmenu = '' )

Load this->tabMenu.

Parameters
string$forcemainmenuTo force mainmenu to load
string$forceleftmenuTo force leftmenu to load
Returns
void

Definition at line 94 of file eldy_menu.php.

References GETPOST(), GETPOSTINT(), and GETPOSTISSET().

◆ loadMenu() [3/3]

MenuManager::loadMenu ( $forcemainmenu = '',
$forceleftmenu = '' )

Load this->tabMenu.

Parameters
string$forcemainmenuTo force mainmenu to load
string$forceleftmenuTo force leftmenu to load
Returns
void

Definition at line 95 of file empty.php.

◆ showmenu() [1/3]

MenuManager::showmenu ( $mode,
$moredata = null )

Output menu on screen.

Menu defined in sql tables were stored into $this->tabMenu BEFORE this is called.

Parameters
string$mode'top', 'topnb', 'left', 'jmobile' (used to get full xml ul/li menu)
?array<string,string>$moredata An array with more data to output
Returns
int<0,max> 0 or nb of top menu entries if $mode = 'topnb'

Definition at line 157 of file auguria_menu.php.

References $conf, dol_buildpath(), getDolGlobalString(), make_substitutions(), print_auguria_menu(), and print_left_auguria_menu().

◆ showmenu() [2/3]

MenuManager::showmenu ( $mode,
$moredata = null )

Output menu on screen.

Menu defined in sql tables were stored into $this->tabMenu BEFORE this is called.

Parameters
'top'|'topnb'|'left'|'leftdropdown'|'jmobile'$mode 'top', 'topnb', 'left', 'leftdropdown', 'jmobile' (used to get full xml ul/li menu)
?array<string,string>$moredata An array with more data to output
Returns
int<0,max> 0 or nb of top menu entries if $mode = 'topnb'

Definition at line 153 of file eldy_menu.php.

References $conf, dol_buildpath(), getDolGlobalString(), getUrlToCompare(), make_substitutions(), and print_eldy_menu().

◆ showmenu() [3/3]

MenuManager::showmenu ( $mode,
$moredata = null )

Output menu on screen.

Parameters
string$mode'top', 'left', 'jmobile'
?array<string,mixed>$moredata An array with more data to output
Returns
int<0,max>|string 0 or nb of top menu entries if $mode = 'topnb', string inc ase of bad parameter

Definition at line 109 of file empty.php.

References $id, dol_buildpath(), dol_sort_array(), getDolGlobalString(), make_substitutions(), print_end_menu_array_empty(), print_end_menu_entry_empty(), print_start_menu_array_empty(), print_start_menu_entry_empty(), and print_text_menu_entry_empty().


The documentation for this class was generated from the following files: