mymodulewidget1
class mymodulewidget1 extends ModeleBoxes (View source)
Class to manage the box
Warning: for the box to be detected correctly by dolibarr, the filename should be the lowercase classname
Properties
| DoliDB | $db | from ModeleBoxes | |
| ""|"development"|"experimental"|"dolibarr" | $version | Must be defined in the box class |
from ModeleBoxes |
| string | $param | from ModeleBoxes | |
| 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 | from ModeleBoxes | |
| 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 | from ModeleBoxes | |
| string | $error | from ModeleBoxes | |
| int<0, max> | $max | from ModeleBoxes | |
| bool|int | $enabled | from ModeleBoxes | |
| $hidden | from ModeleBoxes | ||
| int | $rowid | from ModeleBoxes | |
| int deprecated | $id | from ModeleBoxes | |
| int | $position | from ModeleBoxes | |
| string | $box_order | from ModeleBoxes | |
| int | $fk_user | from ModeleBoxes | |
| string | $sourcefile | from ModeleBoxes | |
| string | $class | from ModeleBoxes | |
| string | $box_id | from ModeleBoxes | |
| string | $lang | ||
| string | $boxcode | ||
| string | $note | from ModeleBoxes | |
| string | $widgettype | ||
| string | $boximg | ||
| string | $boxlabel | ||
| string[] | $depends | ||
| string | $urltoaddentry | from ModeleBoxes | |
| string | $msgNoRecords | from ModeleBoxes |
Methods
Load data into info_box_contents array to show array later. Called by Dolibarr before displaying the box.
Method to show box. Called when the box needs to be displayed.
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 into info_box_contents array to show array later. Called by Dolibarr before displaying the box.
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)
Method to show box. Called when the box needs to be displayed.
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.