28include_once DOL_DOCUMENT_ROOT.
"/core/boxes/modules_boxes.php";
42 public $boxcode =
"mymodulebox";
48 public $boximg =
"mymodule@mymodule";
58 public $depends = array(
'mymodule');
63 public $widgettype =
'graph';
74 global $user, $conf, $langs;
76 $langs->loadLangs(array(
"boxes",
"mymodule@mymodule"));
78 parent::__construct($db, $param);
80 $this->boxlabel = $langs->transnoentitiesnoconv(
"MyWidget");
82 $this->param = $param;
106 $text = $langs->trans(
"MyModuleBoxDescription", $max);
107 $this->info_box_head = array(
111 'sublink' =>
'http://example.com',
113 'subpicto' =>
'object_mymodule@mymodule',
119 'subclass' =>
'center',
127 $this->info_box_contents = array(
131 'tr' =>
'class="left"',
136 'text' =>
'First cell of first line',
138 'url' =>
'http://example.com',
140 'target' =>
'_blank',
144 'textnoformat' =>
'',
159 'text' =>
'Second cell',
164 'tr' =>
'class="left"',
165 'text' =>
'Another line'
168 'tr' =>
'class="left"',
174 'tr' =>
'class="left"',
178 'tr' =>
'class="left"',
193 public function showBox($head =
null, $contents =
null, $nooutput = 0)
197 return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
Class to manage Dolibarr database access.