dolibarr 21.0.0-alpha
InfoBox Class Reference

Class to manage boxes on pages. More...

Static Public Member Functions

static getListOfPagesForBoxes ()
 Name of positions (See below)
 
static listBoxes ($dbs, $mode, $zone, $user=null, $excludelist=array(), $includehidden=1)
 Return array of boxes qualified for area and user.
 
static saveboxorder ($dbs, $zone, $boxorder, $userid=0)
 Save order of boxes for area and user.
 

Detailed Description

Class to manage boxes on pages.

This is an utility class (all is static)

Definition at line 30 of file infobox.class.php.

Member Function Documentation

◆ getListOfPagesForBoxes()

static InfoBox::getListOfPagesForBoxes ( )
static

Name of positions (See below)

Returns
string[] Array with list of zones

Definition at line 37 of file infobox.class.php.

References getDolGlobalInt().

Referenced by DolibarrModules\insert_boxes().

◆ listBoxes()

static InfoBox::listBoxes ( $dbs,
$mode,
$zone,
$user = null,
$excludelist = array(),
$includehidden = 1 )
static

Return array of boxes qualified for area and user.

Parameters
DoliDB$dbsDatabase handler
string$mode'available' or 'activated'
int$zoneName or area (-1 for all, 0 for Homepage, 1 for Accountancy, 2 for xxx, ...)
?User$userObject user to filter
int[]$excludelistArray of box id (box.box_id = boxes_def.rowid) to exclude
int$includehiddenInclude also hidden boxes
Returns
ModeleBoxes[]|array{error:string} Array of boxes or error info

Definition at line 95 of file infobox.class.php.

References dol_include_once(), and dol_syslog().

◆ saveboxorder()

static InfoBox::saveboxorder ( $dbs,
$zone,
$boxorder,
$userid = 0 )
static

Save order of boxes for area and user.

Parameters
DoliDB$dbsDatabase handler
int$zoneKey of area (0 for Homepage, ...)
string$boxorderList of boxes with correct order 'A:123,456,...-B:789,321...'
int$useridId of user
Returns
int Return integer <0 if KO, 0=Nothing done, > 0 if OK

Definition at line 226 of file infobox.class.php.

References $id, dol_set_user_param(), and dol_syslog().


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