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();
83 public $widgettype =
'graph';
94 global $user, $conf, $langs;
96 $langs->loadLangs(array(
"boxes",
"mymodule@mymodule"));
98 parent::__construct($db, $param);
100 $this->boxlabel = $langs->transnoentitiesnoconv(
"MyWidget");
102 $this->param = $param;
124 $text = $langs->trans(
"MyModuleBoxDescription", $max);
125 $this->info_box_head = array(
129 'sublink' =>
'http://example.com',
131 'subpicto' =>
'object_mymodule@mymodule',
137 'subclass' =>
'center',
145 $this->info_box_contents = array(
149 'tr' =>
'class="left"',
154 'text' =>
'First cell of first line',
156 'url' =>
'http://example.com',
158 'target' =>
'_blank',
162 'textnoformat' =>
'',
177 'text' =>
'Second cell',
182 'tr' =>
'class="left"',
183 'text' =>
'Another line'
186 'tr' =>
'class="left"',
192 'tr' =>
'class="left"',
196 'tr' =>
'class="left"',
211 public function showBox($head =
null, $contents =
null, $nooutput = 0)
215 return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
Class to manage Dolibarr database access.