dolibarr  16.0.5
trip.lib.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2011 Regis Houssin <regis.houssin@inodbox.com>
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  * or see https://www.gnu.org/
17  */
18 
30 function trip_prepare_head(Deplacement $object)
31 {
32  global $langs, $conf;
33 
34  $h = 0;
35  $head = array();
36 
37  $head[$h][0] = DOL_URL_ROOT.'/compta/deplacement/card.php?id='.$object->id;
38  $head[$h][1] = $langs->trans("Trip");
39  $head[$h][2] = 'card';
40  $h++;
41 
42  // Show more tabs from modules
43  // Entries must be declared in modules descriptor with line
44  // $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
45  // $this->tabs = array('entity:-tabname); to remove a tab
46  complete_head_from_modules($conf, $langs, $object, $head, $h, 'trip');
47 
48  $head[$h][0] = DOL_URL_ROOT.'/compta/deplacement/document.php?id='.$object->id;
49  $head[$h][1] = $langs->trans("Documents");
50  $head[$h][2] = 'documents';
51  $h++;
52 
53  $head[$h][0] = DOL_URL_ROOT.'/compta/deplacement/info.php?id='.$object->id;
54  $head[$h][1] = $langs->trans("Info");
55  $head[$h][2] = 'info';
56  $h++;
57 
58  complete_head_from_modules($conf, $langs, $object, $head, $h, 'trip', 'remove');
59 
60  return $head;
61 }
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
trip_prepare_head
trip_prepare_head(Deplacement $object)
Prepare array with list of tabs.
Definition: trip.lib.php:30
Deplacement
Class to manage trips and working credit notes.
Definition: deplacement.class.php:33