dolibarr 19.0.4
|
Class to manage menu entries. More...
Public Member Functions | |
__construct ($db, $menu_handler='') | |
Constructor. | |
create ($user=null) | |
Create menu entry into database. | |
update ($user=null, $notrigger=0) | |
Update menu entry into database. | |
fetch ($id, $user=null) | |
Load object in memory from database. | |
delete ($user) | |
Delete object in database. | |
initAsSpecimen () | |
Initialise an instance with random values. | |
menuTopCharger ($mymainmenu, $myleftmenu, $type_user, $menu_handler, &$tabMenu) | |
Load tabMenu array with top menu entries found into database. | |
menuLeftCharger ($newmenu, $mymainmenu, $myleftmenu, $type_user, $menu_handler, &$tabMenu) | |
Load entries found from database (and stored into $tabMenu) in $this->newmenu array. | |
menuLoad ($mymainmenu, $myleftmenu, $type_user, $menu_handler, &$tabMenu) | |
Load entries found in database into variable $tabMenu. | |
Private Member Functions | |
recur ($tab, $pere, $level) | |
Complete this->newmenu with menu entry found in $tab. | |
Class to manage menu entries.
Definition at line 30 of file menubase.class.php.
Menubase::__construct | ( | $db, | |
$menu_handler = '' ) |
Constructor.
Definition at line 171 of file menubase.class.php.
Menubase::create | ( | $user = null | ) |
Create menu entry into database.
Definition at line 184 of file menubase.class.php.
References dol_print_error(), dol_syslog(), position, type, and user.
Menubase::delete | ( | $user | ) |
Delete object in database.
Definition at line 467 of file menubase.class.php.
References dol_syslog().
Menubase::fetch | ( | $id, | |
$user = null ) |
Load object in memory from database.
Definition at line 395 of file menubase.class.php.
References dol_syslog(), position, type, and user.
Menubase::initAsSpecimen | ( | ) |
Initialise an instance with random values.
Used to build previews or test instances. id must be 0 if object instance is a specimen.
Definition at line 492 of file menubase.class.php.
Menubase::menuLeftCharger | ( | $newmenu, | |
$mymainmenu, | |||
$myleftmenu, | |||
$type_user, | |||
$menu_handler, | |||
& | $tabMenu ) |
Load entries found from database (and stored into $tabMenu) in $this->newmenu array.
Warning: Entries in $tabMenu must have child after parent
Menu | $newmenu | Menu array to complete (in most cases, it's empty, may be already initialized with some menu manager like eldy) |
string | $mymainmenu | Value for mainmenu to filter menu to load (often $_SESSION["mainmenu"]) |
string | $myleftmenu | Value for leftmenu to filter menu to load (always '') |
int | $type_user | 0=Menu for backoffice, 1=Menu for front office |
string | $menu_handler | Filter on name of menu_handler used (auguria, eldy...) |
array | $tabMenu | Array with menu entries already loaded |
Definition at line 554 of file menubase.class.php.
References dol_syslog(), and recur().
Menubase::menuLoad | ( | $mymainmenu, | |
$myleftmenu, | |||
$type_user, | |||
$menu_handler, | |||
& | $tabMenu ) |
Load entries found in database into variable $tabMenu.
Note that only "database menu entries" are loaded here, hardcoded will not be present into output.
string | $mymainmenu | Value for mainmenu that defined mainmenu |
string | $myleftmenu | Value for left that defined leftmenu |
int | $type_user | Looks for menu entry for 0=Internal users, 1=External users |
string | $menu_handler | Name of menu_handler used ('auguria', 'eldy'...) |
array | $tabMenu | Array to store new entries found (in most cases, it's empty, but may be alreay filled) |
Definition at line 637 of file menubase.class.php.
References dol_print_error(), make_substitutions(), and verifCond().
Menubase::menuTopCharger | ( | $mymainmenu, | |
$myleftmenu, | |||
$type_user, | |||
$menu_handler, | |||
& | $tabMenu ) |
Load tabMenu array with top menu entries found into database.
string | $mymainmenu | Value for mainmenu to filter menu to load (always '') |
string | $myleftmenu | Value for leftmenu to filter menu to load (always '') |
int | $type_user | 0=Menu for backoffice, 1=Menu for front office |
string | $menu_handler | Filter on name of menu_handler used (auguria, eldy...) |
array | $tabMenu | If array with menu entries already loaded, we put this array here (in most cases, it's empty) |
Definition at line 524 of file menubase.class.php.
|
private |
Complete this->newmenu with menu entry found in $tab.
array | $tab | Tab array with all menu entries |
int | $pere | Id of parent |
int | $level | Level |
Definition at line 772 of file menubase.class.php.
References recur().
Referenced by menuLeftCharger(), and recur().
Menubase::update | ( | $user = null, | |
$notrigger = 0 ) |
Update menu entry into database.
Definition at line 330 of file menubase.class.php.
References dol_syslog(), position, type, and user.