Passed
Branch develop (ad461a)
by
unknown
27:24
created

intracommReportPrepareHead()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 22
Code Lines 11

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 11
nc 1
nop 0
dl 0
loc 22
rs 9.9
c 0
b 0
f 0
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 <[email protected]>
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 <http://www.gnu.org/licenses/>.
17
 */
18
19
/**
20
 * 	\file		htdocs/core/lib/intracommreport.lib.php
21
 * 	\ingroup	Intracomm report
22
 * 	\brief		Library of intracomm report functions
23
 */
24
25
/**
26
 *	Prepare array with list of admin tabs
27
 *
28
 *	@return	array					Array of tabs to show
29
 */
30
function intracommReportAdminPrepareHead()
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
54
/**
55
 *	Prepare array with list of tabs
56
 *
57
 *	@return	array					Array of tabs to show
58
 */
59
function intracommReportPrepareHead()
60
{
61
    global $langs, $conf;
62
63
    $langs->load("intracommreport");
64
65
    $h = 0;
66
    $head = array();
67
68
    $head[$h][0] = DOL_URL_ROOT.'/intracommreport/card.php?rowid='.$object->id;
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $object seems to be never defined.
Loading history...
69
    $head[$h][1] = $langs->trans("Card");
70
    $head[$h][2] = 'card';
71
    $h++;
72
73
    // Show more tabs from modules
74
    // Entries must be declared in modules descriptor with line
75
    // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
76
    // $this->tabs = array('entity:-tabname); to remove a tab
77
    complete_head_from_modules($conf, $langs, null, $head, $h, 'intracommreport');
78
79
    complete_head_from_modules($conf, $langs, null, $head, $h, 'intracommreport', 'remove');
80
    return $head;
81
}
82