dolibarr  13.0.2
takepos.lib.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (C) 2009 Laurent Destailleur <eldy@users.sourceforge.net>
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 {
31  global $langs, $conf;
32 
33  $h = 0;
34  $head = array();
35 
36  $head[$h][0] = DOL_URL_ROOT.'/takepos/admin/setup.php';
37  $head[$h][1] = $langs->trans("Parameters");
38  $head[$h][2] = 'setup';
39  $h++;
40 
41  $head[$h][0] = DOL_URL_ROOT.'/takepos/admin/appearance.php';
42  $head[$h][1] = $langs->trans("Appearance");
43  $head[$h][2] = 'appearance';
44  $h++;
45 
46  $head[$h][0] = DOL_URL_ROOT.'/takepos/admin/receipt.php';
47  $head[$h][1] = $langs->trans("Receipt");
48  $head[$h][2] = 'receipt';
49  $h++;
50 
51  $head[$h][0] = DOL_URL_ROOT.'/takepos/admin/bar.php';
52  $head[$h][1] = $langs->trans("BarRestaurant");
53  $head[$h][2] = 'bar';
54  $h++;
55 
56  $numterminals = max(1, $conf->global->TAKEPOS_NUM_TERMINALS);
57  for ($i = 1; $i <= $numterminals; $i++)
58  {
59  $head[$h][0] = DOL_URL_ROOT.'/takepos/admin/terminal.php?terminal='.$i;
60  $head[$h][1] = $langs->trans("Terminal")." ".$i;
61  $head[$h][2] = 'terminal'.$i;
62  $h++;
63  }
64 
65  $head[$h][0] = DOL_URL_ROOT.'/takepos/admin/other.php';
66  $head[$h][1] = $langs->trans("Other");
67  $head[$h][2] = 'other';
68  $h++;
69 
70  complete_head_from_modules($conf, $langs, null, $head, $h, 'takepos_admin');
71 
72  complete_head_from_modules($conf, $langs, null, $head, $h, 'takepos_admin', 'remove');
73 
74  return $head;
75 }
takepos_admin_prepare_head()
Prepare array with list of tabs.
Definition: takepos.lib.php:29
complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type, $mode= 'add')
Complete or removed entries into a head array (used to build tabs).