dolibarr  17.0.4
Functions
treeview.lib.php File Reference

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. More...
 
 tree_recur ($tab, $pere, $rang, $iddivjstree='iddivjstree', $donoresetalreadyloaded=0, $showfk=0, $moreparam='')
 Recursive function to output a tree. More...
 

Detailed Description

Libraries for tree views.

Definition in file treeview.lib.php.

Function Documentation

◆ tree_recur()

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.

Parameters
array$tabArray of all elements
array$pereArray with parent ids ('rowid'=>,'mainmenu'=>,'leftmenu'=>,'fk_mainmenu=>,'fk_leftmenu=>)
int$rangLevel of element
string$iddivjstreeId to use for parent ul element
int$donoresetalreadyloadedDo not reset global array $donoresetalreadyloaded used to avoid to go down on an aleady processed record
int$showfk1=show fk_links to parent into label (used by menu editor only)
string$moreparamAdd more param on url of elements
Returns
void

Definition at line 114 of file treeview.lib.php.

◆ tree_showpad()

tree_showpad ( $fulltree,
  $key,
  $silent = 0 
)

Show indent and picto of a tree line.

Return array with information of line.

Parameters
array$fulltreeArray of entries in correct order
string$keyKey of entry into fulltree to show picto
int$silentDo not output indent and picto, returns only value
Returns
integer[] array(0 or 1 if at least one of this level after, 0 or 1 if at least one of higher level after, nbofdirinsub, nbofdocinsub)

Definition at line 36 of file treeview.lib.php.