28include_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;
126 $text = $langs->trans(
"MyModuleBoxDescription", $max);
127 $this->info_box_head = array(
131 'sublink' =>
'http://example.com',
133 'subpicto' =>
'object_mymodule@mymodule',
139 'subclass' =>
'center',
147 $this->info_box_contents = array(
151 'tr' =>
'class="left"',
156 'text' =>
'First cell of first line',
158 'url' =>
'http://example.com',
160 'target' =>
'_blank',
164 'textnoformat' =>
'',
179 'text' =>
'Second cell',
184 'tr' =>
'class="left"',
185 'text' =>
'Another line'
188 'tr' =>
'class="left"',
194 'tr' =>
'class="left"',
198 'tr' =>
'class="left"',
213 public function showBox($head =
null, $contents =
null, $nooutput = 0)
217 return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
Class to manage Dolibarr database access.