|
1
|
|
|
<?php |
|
2
|
|
|
/* |
|
3
|
|
|
ÁTICA - Aplicación web para la gestión documental de centros educativos |
|
4
|
|
|
|
|
5
|
|
|
Copyright (C) 2015-2016: Luis Ramón López López |
|
6
|
|
|
|
|
7
|
|
|
This program is free software: you can redistribute it and/or modify |
|
8
|
|
|
it under the terms of the GNU Affero General Public License as published by |
|
9
|
|
|
the Free Software Foundation, either version 3 of the License, or |
|
10
|
|
|
(at your option) any later version. |
|
11
|
|
|
|
|
12
|
|
|
This program is distributed in the hope that it will be useful, |
|
13
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
14
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
15
|
|
|
GNU Affero General Public License for more details. |
|
16
|
|
|
|
|
17
|
|
|
You should have received a copy of the GNU Affero General Public License |
|
18
|
|
|
along with this program. If not, see [http://www.gnu.org/licenses/]. |
|
19
|
|
|
*/ |
|
20
|
|
|
|
|
21
|
|
|
namespace AppBundle\Service; |
|
22
|
|
|
|
|
23
|
|
|
use AppBundle\Menu\MenuItem; |
|
24
|
|
|
|
|
25
|
|
|
class AppMenu implements MenuBuilderInterface |
|
26
|
|
|
{ |
|
27
|
|
|
public function updateMenu(&$menu) |
|
28
|
|
|
{ |
|
29
|
|
|
/** |
|
30
|
|
|
* @var $mainItem MenuItem |
|
31
|
|
|
*/ |
|
32
|
|
|
$mainItem = reset($menu); |
|
33
|
|
|
|
|
34
|
|
|
$item = new MenuItem(); |
|
35
|
|
|
$item |
|
36
|
|
|
->setName('personal') |
|
37
|
|
|
->setRouteName('personal_form') |
|
38
|
|
|
->setCaption('menu.personal') |
|
39
|
|
|
->setDescription('menu.personal.detail') |
|
40
|
|
|
->setColor('purple') |
|
41
|
|
|
->setIcon('cog'); |
|
42
|
|
|
|
|
43
|
|
|
$mainItem->addChild($item); |
|
44
|
|
|
|
|
45
|
|
|
$item = new MenuItem(); |
|
46
|
|
|
$item |
|
47
|
|
|
->setName('logout') |
|
48
|
|
|
->setRouteName('logout') |
|
49
|
|
|
->setCaption('menu.logout') |
|
50
|
|
|
->setDescription('menu.logout.detail') |
|
51
|
|
|
->setColor('gray') |
|
52
|
|
|
->setIcon('power-off'); |
|
53
|
|
|
|
|
54
|
|
|
$mainItem->addChild($item); |
|
55
|
|
|
|
|
56
|
|
|
$menu[] = $mainItem; |
|
57
|
|
|
} |
|
58
|
|
|
|
|
59
|
|
|
public function getMenuPriority() |
|
60
|
|
|
{ |
|
61
|
|
|
return '9999-App'; |
|
62
|
|
|
} |
|
63
|
|
|
} |
|
64
|
|
|
|