dolibarr 21.0.0-beta
|
Libraries for tree views. More...
Go to the source code of this file.
Functions | |
tree_showpad (&$fulltree, $key, $silent=0) | |
Show indent and picto of a tree line. | |
tree_recur ($tab, $pere, $rang, $iddivjstree='iddivjstree', $donoresetalreadyloaded=0, $showfk=0, $moreparam='') | |
Recursive function to output a tree. | |
Libraries for tree views.
Definition in file treeview.lib.php.
tree_recur | ( | $tab, | |
$pere, | |||
$rang, | |||
$iddivjstree = 'iddivjstree', | |||
$donoresetalreadyloaded = 0, | |||
$showfk = 0, | |||
$moreparam = '' ) |
Recursive function to output a tree.
It is also used for the tree of categories. Note: To have this function working, check you have loaded the js and css for treeview. $arrayofjs=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.js', '/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js'); $arrayofcss=array('/includes/jquery/plugins/jquerytreeview/jquery.treeview.css'); TODO Replace with jstree plugin instead of treeview plugin.
array<array{rowid:int,module?:string,fk_menu?:int,title?:string,mainmenu?:string,leftmenu?:string,fk_mainmenu?:string,fk_leftmenu?:string,statut?:int,entry?:string,buttons?:string}> | $tab Array of all elements | |
array{rowid:int,module?:string,fk_menu?:int,title?:string,mainmenu?:string,leftmenu?:string,fk_mainmenu?:string,fk_leftmenu?:string,statut?:int,entry?:string,buttons?:string} | $pere Array with parent ids ('rowid'=>,'mainmenu'=>,'leftmenu'=>,'fk_mainmenu'=>,'fk_leftmenu'=>) | |
int | $rang | Level of element |
string | $iddivjstree | Id to use for parent ul element |
int<0,1> | $donoresetalreadyloaded Do not reset global array $donoresetalreadyloaded used to avoid to go down on an already processed record | |
int<0,1> | $showfk 1=show fk_links to parent into label (used by menu editor only) | |
string | $moreparam | Add more param on url of elements |
Definition at line 120 of file treeview.lib.php.
References dol_syslog(), newToken(), and tree_recur().
Referenced by tree_recur().
tree_showpad | ( | & | $fulltree, |
$key, | |||
$silent = 0 ) |
Show indent and picto of a tree line.
Return array with information of line.
array<int,array{rowid:int,id:int,fk_parent:int,label:string,description:string,color:string,position:string,visible:int,ref_ext:string,picto:string,fullpath:string,fulllabel:string,level:int,cachenbofdoc?:int}> | $fulltree Array of entries in correct order | |
int | $key | Key of entry into fulltree to show picto |
int<0,1> | $silent Do not output indent and picto, returns only value |
Definition at line 37 of file treeview.lib.php.
References img_picto_common().
Referenced by treeOutputForAbsoluteDir().