dolibarr  17.0.4
intracommreport.lib.php
Go to the documentation of this file.
1 <?php
2 /* <one line to give the program's name and a brief idea of what it does.>
3  * Copyright (C) 2015 ATM Consulting <support@atm-consulting.fr>
4  *
5  * This program is free software: you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation, either version 3 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program. If not, see <https://www.gnu.org/licenses/>.
17  */
18 
31 {
32  global $langs, $conf;
33 
34  $langs->load("intracommreport");
35 
36  $h = 0;
37  $head = array();
38 
39  $head[$h][0] = DOL_URL_ROOT.'/intracommreport/admin/intracommreport.php';
40  $head[$h][1] = $langs->trans("Parameters");
41  $head[$h][2] = 'general';
42  $h++;
43 
44  // Show more tabs from modules
45  // Entries must be declared in modules descriptor with line
46  // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
47  // $this->tabs = array('entity:-tabname); to remove a tab
48  complete_head_from_modules($conf, $langs, null, $head, $h, 'intracommreport_admin');
49 
50  complete_head_from_modules($conf, $langs, null, $head, $h, 'intracommreport_admin', 'remove');
51  return $head;
52 }
53 
61 function intracommReportPrepareHead($object)
62 {
63  global $langs, $conf;
64 
65  $langs->load("intracommreport");
66 
67  $h = 0;
68  $head = array();
69 
70  $head[$h][0] = DOL_URL_ROOT.'/intracommreport/card.php?rowid='.$object->id;
71  $head[$h][1] = $langs->trans("Card");
72  $head[$h][2] = 'card';
73  $h++;
74 
75  // Show more tabs from modules
76  // Entries must be declared in modules descriptor with line
77  // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
78  // $this->tabs = array('entity:-tabname); to remove a tab
79  complete_head_from_modules($conf, $langs, null, $head, $h, 'intracommreport');
80 
81  complete_head_from_modules($conf, $langs, null, $head, $h, 'intracommreport', 'remove');
82  return $head;
83 }
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode='add', $filterorigmodule='')
Complete or removed entries into a head array (used to build tabs).
intracommReportPrepareHead($object)
Prepare array with list of tabs.
intracommReportAdminPrepareHead()
Prepare array with list of admin tabs.