dolibarr 21.0.0-beta
hrm.lib.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
3 * Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
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
32{
33 global $langs, $conf;
34
35 $langs->load('hrm');
36
37 $h = 0;
38 $head = array();
39
40 $head[$h][0] = DOL_URL_ROOT.'/hrm/establishment/card.php?id='.$object->id;
41 $head[$h][1] = $langs->trans("Establishment");
42 $head[$h][2] = 'card';
43 $h++;
44
45 // Show more tabs from modules
46 // Entries must be declared in modules descriptor with line
47 // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
48 // $this->tabs = array('entity:-tabname); to remove a tab
49 complete_head_from_modules($conf, $langs, $object, $head, $h, 'establishment');
50
51 $head[$h][0] = DOL_URL_ROOT.'/hrm/establishment/info.php?id='.$object->id;
52 $head[$h][1] = $langs->trans("Info");
53 $head[$h][2] = 'info';
54 $h++;
55
56 complete_head_from_modules($conf, $langs, null, $head, $h, 'hrm');
57
58 complete_head_from_modules($conf, $langs, $object, $head, $h, 'establishment', 'remove');
59
60 return $head;
61}
62
69{
70 global $langs, $conf;
71
72 $langs->load('hrm');
73
74 $h = 0;
75 $head = array();
76
77 $head[$h][0] = DOL_URL_ROOT.'/hrm/admin/admin_hrm.php';
78 $head[$h][1] = $langs->trans("Parameters");
79 $head[$h][2] = 'parameters';
80 $h++;
81
82 $head[$h][0] = DOL_URL_ROOT.'/hrm/admin/admin_establishment.php';
83 $head[$h][1] = $langs->trans("Establishments");
84 $head[$h][2] = 'establishments';
85 $h++;
86
87 // Show more tabs from modules
88 // Entries must be declared in modules descriptor with line
89 // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
90 // $this->tabs = array('entity:-tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to remove a tab
91 complete_head_from_modules($conf, $langs, null, $head, $h, 'hrm_admin');
92
93 complete_head_from_modules($conf, $langs, null, $head, $h, 'hrm_admin', 'remove');
94
95 return $head;
96}
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Definition card.php:66
establishment_prepare_head($object)
Return head table for establishment tabs screen.
Definition hrm.lib.php:31
hrm_admin_prepare_head()
Return array head with list of tabs to view object information.
Definition hrm.lib.php:68
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).
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...
Definition member.php:79