ModeleBoxes
class ModeleBoxes (View source)
Class ModeleBoxes
Boxes parent class
Properties
| DoliDB | $db | ||
| ""|"development"|"experimental"|"dolibarr" | $version | Must be defined in the box class |
|
| string | $param | ||
| array<array{text: string, nbcol?: int, limit?: int, graph?: int<0, 1>, sublink?: string, subtext?: string, picto?: string, target?: string, td?: string}>|array{text: string, nbcol?: int, limit?: int, graph?: int<0, 1>, sublink?: string, subtext?: string, picto?: string, target?: string, td?: string} | $info_box_head | ||
| array<array<array{td?: string, text: string, asis?: int<0, 1>, maxlength?: int}>>|array<array{td?: string, text: string, asis?: int<0, 1>, maxlength?: int}> | $info_box_contents | ||
| string | $error | ||
| int<0, max> | $max | ||
| bool|int | $enabled | ||
| $hidden | |||
| int | $rowid | ||
| int deprecated | $id | ||
| int | $position | ||
| string | $box_order | ||
| int | $fk_user | ||
| string | $sourcefile | ||
| string | $class | ||
| string | $box_id | ||
| string | $lang | ||
| string | $boxcode | ||
| string | $note | ||
| string | $widgettype | ||
| string | $boximg | Note $picto is deprecated |
|
| string | $boxlabel | ||
| string[] | $depends | ||
| string | $urltoaddentry | ||
| string | $msgNoRecords |
Methods
Load data for box to show them later
Return last error message
Load a box line from its rowid
Standard method to show a box (usage by boxes not mandatory, a box can still use its own showBox function)
Return list of widget. Function used by admin page htdoc/admin/widget.
Details
__construct(DoliDB $db, string $param = '')
Constructor
void
loadBox($max = 5)
Load data for box to show them later
@param int<0,max> $max Maximum number of records to load
string
error()
Return last error message
int<-1, 1>
fetch(int $rowid)
Load a box line from its rowid
string
showBox(?array<array{text?: string, sublink?: string, subtext?: string, subpicto?: ?string, picto?: string, nbcol?: int, limit?: int, subclass?: string, graph?: int<0, 1>, target?: string}> $head = null, ?array<array{tr?: string, td?: string, target?: string, text?: string, text2?: string, textnoformat?: string, tooltip?: string, logo?: string, url?: string, maxlength?: int, asis?: int<0, 1>}> $contents = null, int<0, 1> $nooutput = 0)
Standard method to show a box (usage by boxes not mandatory, a box can still use its own showBox function)
static array<array{picto: string, file: string, fullpath: string, relpath: string, iscoreorexternal: "external"|"internal", version: string, status: string, info: string}>
getWidgetsList(?string[] $forcedirwidget = null)
Return list of widget. Function used by admin page htdoc/admin/widget.
List is sorted by widget filename so by priority to run.