|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace App\Menu; |
|
4
|
|
|
|
|
5
|
|
|
use Knp\Menu\ItemInterface; |
|
6
|
|
|
|
|
7
|
|
|
class AdminSettingsMenuBuilder extends AbstractMenuBuilder { |
|
8
|
|
|
public function settingsMenu(array $options = [ ]): ItemInterface { |
|
|
|
|
|
|
9
|
|
|
$root = $this->factory->createItem('root'); |
|
10
|
|
|
|
|
11
|
|
|
if($this->authorizationChecker->isGranted('ROLE_ADMIN')) { |
|
12
|
|
|
$root->addChild('admin.settings.general.label', [ |
|
13
|
|
|
'route' => 'admin_settings_general' |
|
14
|
|
|
]) |
|
15
|
|
|
->setExtra('icon', 'fas fa-wrench'); |
|
16
|
|
|
|
|
17
|
|
|
$root->addChild('admin.settings.dashboard.label', [ |
|
18
|
|
|
'route' => 'admin_settings_dashboard' |
|
19
|
|
|
]) |
|
20
|
|
|
->setExtra('icon', 'fas fa-home'); |
|
21
|
|
|
|
|
22
|
|
|
$root->addChild('admin.settings.notifications.label', [ |
|
23
|
|
|
'route' => 'admin_settings_notifications' |
|
24
|
|
|
]) |
|
25
|
|
|
->setExtra('icon', 'fas fa-bell'); |
|
26
|
|
|
|
|
27
|
|
|
$root->addChild('admin.settings.timetable.label', [ |
|
28
|
|
|
'route' => 'admin_settings_timetable' |
|
29
|
|
|
]) |
|
30
|
|
|
->setExtra('icon', 'fas fa-clock'); |
|
31
|
|
|
|
|
32
|
|
|
$root->addChild('admin.settings.substitutions.label', [ |
|
33
|
|
|
'route' => 'admin_settings_substitutions' |
|
34
|
|
|
]) |
|
35
|
|
|
->setExtra('icon', 'fas fa-random'); |
|
36
|
|
|
|
|
37
|
|
|
$root->addChild('admin.settings.exams.label', [ |
|
38
|
|
|
'route' => 'admin_settings_exams' |
|
39
|
|
|
]) |
|
40
|
|
|
->setExtra('icon', 'fas fa-edit'); |
|
41
|
|
|
|
|
42
|
|
|
$root->addChild('admin.settings.appointments.label', [ |
|
43
|
|
|
'route' => 'admin_settings_appointments' |
|
44
|
|
|
]) |
|
45
|
|
|
->setExtra('icon', 'far fa-calendar'); |
|
46
|
|
|
|
|
47
|
|
|
$root->addChild('admin.settings.student_absences.label', [ |
|
48
|
|
|
'route' => 'admin_settings_absences' |
|
49
|
|
|
]) |
|
50
|
|
|
->setExtra('icon', 'fas fa-user-times'); |
|
51
|
|
|
|
|
52
|
|
|
$root->addChild('admin.settings.book.label', [ |
|
53
|
|
|
'route' => 'admin_settings_book' |
|
54
|
|
|
]) |
|
55
|
|
|
->setExtra('icon', 'fas fa-book-open'); |
|
56
|
|
|
|
|
57
|
|
|
$root->addChild('admin.settings.tuition_grades.label', [ |
|
58
|
|
|
'route' => 'admin_settings_gradebook' |
|
59
|
|
|
]) |
|
60
|
|
|
->setExtra('icon', 'fas fa-user-graduate'); |
|
61
|
|
|
|
|
62
|
|
|
$root->addChild('admin.settings.import.label', [ |
|
63
|
|
|
'route' => 'admin_settings_import' |
|
64
|
|
|
]) |
|
65
|
|
|
->setExtra('icon', 'fas fa-upload'); |
|
66
|
|
|
} |
|
67
|
|
|
|
|
68
|
|
|
return $root; |
|
69
|
|
|
} |
|
70
|
|
|
} |
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.