28 include_once DOL_DOCUMENT_ROOT.
"/core/boxes/modules_boxes.php";
42 public $boxcode =
"mymodulebox";
48 public $boximg =
"mymodule@mymodule";
58 public $depends = array(
'mymodule');
73 public $info_box_head = array();
78 public $info_box_contents = array();
88 global $user, $conf, $langs;
89 $langs->load(
"boxes");
90 $langs->load(
'mymodule@mymodule');
92 parent::__construct($db, $param);
94 $this->boxlabel = $langs->transnoentitiesnoconv(
"MyWidget");
96 $this->param = $param;
118 $text = $langs->trans(
"MyModuleBoxDescription", $max);
119 $this->info_box_head = array(
123 'sublink' =>
'http://example.com',
125 'subpicto' =>
'object_mymodule@mymodule',
131 'subclass' =>
'center',
139 $this->info_box_contents = array(
143 'tr' =>
'class="left"',
148 'text' =>
'First cell of first line',
150 'url' =>
'http://example.com',
152 'target' =>
'_blank',
156 'textnoformat' =>
'',
171 'text' =>
'Second cell',
176 'tr' =>
'class="left"',
177 'text' =>
'Another line'
180 'tr' =>
'class="left"',
186 'tr' =>
'class="left"',
190 'tr' =>
'class="left"',
205 public function showBox($head = null, $contents = null, $nooutput = 0)
209 return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
Class to manage Dolibarr database access.