dolibarr  16.0.5
hrm.lib.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program. If not, see <https://www.gnu.org/licenses/>.
16  */
17 
30 function establishment_prepare_head($object)
31 {
32  global $langs, $conf;
33 
34  $langs->load('hrm');
35 
36  $h = 0;
37  $head = array();
38 
39  $head[$h][0] = DOL_URL_ROOT.'/hrm/establishment/card.php?id='.$object->id;
40  $head[$h][1] = $langs->trans("Establishment");
41  $head[$h][2] = 'card';
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, $object, $head, $h, 'establishment');
49 
50  $head[$h][0] = DOL_URL_ROOT.'/hrm/establishment/info.php?id='.$object->id;
51  $head[$h][1] = $langs->trans("Info");
52  $head[$h][2] = 'info';
53  $h++;
54 
55  complete_head_from_modules($conf, $langs, $object, $head, $h, 'establishment', 'remove');
56 
57 
58 
59  $head[$h][0] = dol_buildpath("/hrm/admin/setup.php", 1);
60  $head[$h][1] = $langs->trans("Settings");
61  $head[$h][2] = 'settings';
62  $h++;
63 
64  complete_head_from_modules($conf, $langs, null, $head, $h, 'hrm');
65 
66  $head[$h][0] = dol_buildpath("/hrm/admin/about.php", 1);
67  $head[$h][1] = $langs->trans("About");
68  $head[$h][2] = 'about';
69  $h++;
70 
71  complete_head_from_modules($conf, $langs, null, $head, $h, 'hrm');
72 
73  return $head;
74 }
75 
82 {
83  global $langs, $conf, $user;
84 
85  $langs->load('hrm');
86 
87  $h = 0;
88  $head = array();
89 
90  $head[$h][0] = DOL_URL_ROOT.'/hrm/admin/admin_hrm.php';
91  $head[$h][1] = $langs->trans("Parameters");
92  $head[$h][2] = 'parameters';
93  $h++;
94 
95  $head[$h][0] = DOL_URL_ROOT.'/hrm/admin/admin_establishment.php';
96  $head[$h][1] = $langs->trans("Establishments");
97  $head[$h][2] = 'establishments';
98  $h++;
99 
100  // Show more tabs from modules
101  // Entries must be declared in modules descriptor with line
102  // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
103  // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab
104  complete_head_from_modules($conf, $langs, null, $head, $h, 'hrm_admin');
105 
106  complete_head_from_modules($conf, $langs, null, $head, $h, 'hrm_admin', 'remove');
107 
108  return $head;
109 }
dol_buildpath
dol_buildpath($path, $type=0, $returnemptyifnotfound=0)
Return path of url or filesystem.
Definition: functions.lib.php:1062
complete_head_from_modules
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode='add')
Complete or removed entries into a head array (used to build tabs).
Definition: functions.lib.php:9038
hrm_admin_prepare_head
hrm_admin_prepare_head()
Return array head with list of tabs to view object informations.
Definition: hrm.lib.php:81
establishment_prepare_head
establishment_prepare_head($object)
Return head table for establishment tabs screen.
Definition: hrm.lib.php:30