1
|
|
|
<?php |
2
|
|
|
/* Copyright (C) 2019 Alxarafe <[email protected]> |
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 <http://www.gnu.org/licenses/>. |
16
|
|
|
*/ |
17
|
|
|
namespace Alixar\Base; |
18
|
|
|
|
19
|
|
|
/** |
20
|
|
|
* This class contains the methods and attributes common to all Alixar view |
21
|
|
|
* |
22
|
|
|
* @author Alxarafe |
23
|
|
|
*/ |
24
|
|
|
class AlixarView extends \Alxarafe\Base\View |
25
|
|
|
{ |
26
|
|
|
|
27
|
|
|
public $defaultlang; |
28
|
|
|
public $favicon; |
29
|
|
|
public $title; |
30
|
|
|
|
31
|
|
|
public function __construct() |
32
|
|
|
{ |
33
|
|
|
parent::__construct(); |
34
|
|
|
|
35
|
|
|
$this->defaultlang = 'ES'; |
36
|
|
|
$this->favicon = DOL_BASE_URI . '/theme/eldy/img/favicon.ico'; |
37
|
|
|
$this->title = 'Inicio - Alixar 0.0.0-alpha'; |
38
|
|
|
} |
39
|
|
|
|
40
|
|
|
public function getTopMenu() |
41
|
|
|
{ |
42
|
|
|
$ret[] = [ |
|
|
|
|
43
|
|
|
'text' => '<i class="fa fa-cog fa-fw"></i> Config', |
44
|
|
|
'href' => '?call=EditConfig', |
45
|
|
|
]; |
46
|
|
|
$ret[] = [ |
47
|
|
|
'text' => '<i class="fa fa-database fa-fw"></i> Database', |
48
|
|
|
'href' => 'index.html', |
49
|
|
|
'options' => [ |
50
|
|
|
[ |
51
|
|
|
'text' => '<i class="fa fa-address-book fa-fw"></i> People', |
52
|
|
|
'href' => '?call=People' |
53
|
|
|
], |
54
|
|
|
[ |
55
|
|
|
'text' => '<i class="fa fa-automobile fa-fw"></i> Vehicles', |
56
|
|
|
'href' => '?call=Vehicles', |
57
|
|
|
'options' => [ |
58
|
|
|
'text' => '<i class="fa fa-address-book fa-fw"></i> People', |
59
|
|
|
'href' => '?call=People' |
60
|
|
|
] |
61
|
|
|
] |
62
|
|
|
] |
63
|
|
|
]; |
64
|
|
|
|
65
|
|
|
return $ret; |
66
|
|
|
} |
67
|
|
|
|
68
|
|
|
public function getLeftMenu(): array |
69
|
|
|
{ |
70
|
|
|
$ret[] = [ |
|
|
|
|
71
|
|
|
'text' => '<i class="fa fa-cog fa-fw"></i> Config', |
72
|
|
|
'href' => '?call=EditConfig', |
73
|
|
|
]; |
74
|
|
|
$ret[] = [ |
75
|
|
|
'text' => '<i class="fa fa-database fa-fw"></i> Database', |
76
|
|
|
'href' => 'index.html', |
77
|
|
|
'options' => [ |
78
|
|
|
[ |
79
|
|
|
'text' => '<i class="fa fa-address-book fa-fw"></i> People', |
80
|
|
|
'href' => '?call=People' |
81
|
|
|
], |
82
|
|
|
[ |
83
|
|
|
'text' => '<i class="fa fa-automobile fa-fw"></i> Vehicles', |
84
|
|
|
'href' => '?call=Vehicles', |
85
|
|
|
'options' => [ |
86
|
|
|
'text' => '<i class="fa fa-address-book fa-fw"></i> People', |
87
|
|
|
'href' => '?call=People' |
88
|
|
|
] |
89
|
|
|
] |
90
|
|
|
] |
91
|
|
|
]; |
92
|
|
|
|
93
|
|
|
return $ret; |
94
|
|
|
} |
95
|
|
|
} |
96
|
|
|
|