|
1
|
|
|
<?php |
|
2
|
|
|
/* For licensing terms, see /license.txt */ |
|
3
|
|
|
|
|
4
|
|
|
namespace Chamilo\CoreBundle\Menu; |
|
5
|
|
|
|
|
6
|
|
|
use Chamilo\FaqBundle\Entity\Category; |
|
7
|
|
|
use Chamilo\PageBundle\Entity\Page; |
|
8
|
|
|
use Chamilo\PageBundle\Entity\Site; |
|
9
|
|
|
use Knp\Menu\FactoryInterface; |
|
10
|
|
|
use Knp\Menu\ItemInterface; |
|
11
|
|
|
use Symfony\Component\DependencyInjection\ContainerAwareInterface; |
|
12
|
|
|
use Symfony\Component\DependencyInjection\ContainerAwareTrait; |
|
13
|
|
|
|
|
14
|
|
|
/** |
|
15
|
|
|
* Class NavBuilder. |
|
16
|
|
|
* |
|
17
|
|
|
* @package Chamilo\CoreBundle\Menu |
|
18
|
|
|
*/ |
|
19
|
|
|
class NavBuilder implements ContainerAwareInterface |
|
20
|
|
|
{ |
|
21
|
|
|
use ContainerAwareTrait; |
|
22
|
|
|
|
|
23
|
|
|
private $regexVoter; |
|
24
|
|
|
private $factory; |
|
25
|
|
|
|
|
26
|
|
|
public function __construct(MenuVoter $regexVoter, FactoryInterface $factory) |
|
27
|
|
|
{ |
|
28
|
|
|
$this->regexVoter = $regexVoter; |
|
29
|
|
|
$this->factory = $factory; |
|
30
|
|
|
} |
|
31
|
|
|
|
|
32
|
|
|
/** |
|
33
|
|
|
* @param array $itemOptions The options given to the created menuItem |
|
34
|
|
|
* @param string $currentUri The current URI |
|
35
|
|
|
* |
|
36
|
|
|
* @return ItemInterface |
|
37
|
|
|
*/ |
|
38
|
|
|
public function createCategoryMenu(array $itemOptions = [], $currentUri = null) |
|
39
|
|
|
{ |
|
40
|
|
|
$factory = $this->container->get('knp_menu.factory'); |
|
41
|
|
|
$menu = $factory->createItem('categories', $itemOptions); |
|
42
|
|
|
|
|
43
|
|
|
$this->buildCategoryMenu($menu, $itemOptions, $currentUri); |
|
44
|
|
|
|
|
45
|
|
|
return $menu; |
|
46
|
|
|
} |
|
47
|
|
|
|
|
48
|
|
|
/** |
|
49
|
|
|
* @param ItemInterface $menu The item to fill with $routes |
|
50
|
|
|
* @param array $options The item options |
|
51
|
|
|
* @param string $currentUri The current URI |
|
52
|
|
|
*/ |
|
53
|
|
|
public function buildCategoryMenu(ItemInterface $menu, array $options = [], $currentUri = null) |
|
54
|
|
|
{ |
|
55
|
|
|
//$categories = $this->categoryManager->getCategoryTree(); |
|
56
|
|
|
|
|
57
|
|
|
//$this->fillMenu($menu, $categories, $options, $currentUri); |
|
58
|
|
|
$menu->addChild('home', ['route' => 'home']); |
|
59
|
|
|
} |
|
60
|
|
|
|
|
61
|
|
|
/** |
|
62
|
|
|
* Top menu left. |
|
63
|
|
|
* |
|
64
|
|
|
* @param array $options |
|
65
|
|
|
* |
|
66
|
|
|
* @return ItemInterface |
|
67
|
|
|
*/ |
|
68
|
|
|
public function menuApp(array $options): ItemInterface |
|
69
|
|
|
{ |
|
70
|
|
|
$container = $this->container; |
|
71
|
|
|
$checker = $container->get('security.authorization_checker'); |
|
72
|
|
|
$translator = $container->get('translator'); |
|
73
|
|
|
$router = $container->get('router'); |
|
74
|
|
|
$factory = $this->factory; |
|
75
|
|
|
|
|
76
|
|
|
$menu = $factory->createItem('root', ['childrenAttributes' => ['class' => 'navbar-nav']]); |
|
77
|
|
|
$settingsManager = $container->get('chamilo.settings.manager'); |
|
78
|
|
|
$rootWeb = $router->generate('legacy_index'); |
|
79
|
|
|
|
|
80
|
|
|
$menu->addChild( |
|
81
|
|
|
'home', |
|
82
|
|
|
[ |
|
83
|
|
|
'label' => $translator->trans('Home'), |
|
84
|
|
|
'route' => 'legacy_index', |
|
85
|
|
|
'icon' => 'home', |
|
86
|
|
|
] |
|
87
|
|
|
); |
|
88
|
|
|
|
|
89
|
|
|
if ($checker && $checker->isGranted('IS_AUTHENTICATED_FULLY')) { |
|
90
|
|
|
$menu->addChild( |
|
91
|
|
|
'courses', |
|
92
|
|
|
[ |
|
93
|
|
|
'label' => $translator->trans('Courses'), |
|
94
|
|
|
'route' => 'legacy_main', |
|
95
|
|
|
'routeParameters' => ['name' => '../user_portal.php'], |
|
96
|
|
|
'icon' => 'book', |
|
97
|
|
|
] |
|
98
|
|
|
)->setLinkAttribute('class', 'jui'); |
|
99
|
|
|
|
|
100
|
|
|
$menu['courses']->addChild( |
|
101
|
|
|
'courses', |
|
102
|
|
|
[ |
|
103
|
|
|
'label' => $translator->trans('All my courses'), |
|
104
|
|
|
'route' => 'legacy_main', |
|
105
|
|
|
'routeParameters' => ['name' => '../user_portal.php'], |
|
106
|
|
|
] |
|
107
|
|
|
); |
|
108
|
|
|
|
|
109
|
|
|
$browse = $settingsManager->getSetting('display.allow_students_to_browse_courses'); |
|
110
|
|
|
|
|
111
|
|
|
if ('true' === $browse) { |
|
112
|
|
|
if ($checker->isGranted('ROLE_STUDENT') && !api_is_drh() && !api_is_session_admin()) { |
|
113
|
|
|
$menu['courses']->addChild( |
|
114
|
|
|
'catalog', |
|
115
|
|
|
[ |
|
116
|
|
|
'label' => $translator->trans('Course catalog'), |
|
117
|
|
|
'route' => 'legacy_main', |
|
118
|
|
|
'routeParameters' => ['name' => 'auth/courses.php'], |
|
119
|
|
|
] |
|
120
|
|
|
); |
|
121
|
|
|
} |
|
122
|
|
|
} |
|
123
|
|
|
|
|
124
|
|
|
$menu['courses']->addChild( |
|
125
|
|
|
$translator->trans('Course history'), |
|
126
|
|
|
[ |
|
127
|
|
|
'route' => 'legacy_main', |
|
128
|
|
|
'routeParameters' => ['name' => '../user_portal.php'], |
|
129
|
|
|
] |
|
130
|
|
|
); |
|
131
|
|
|
|
|
132
|
|
|
if (api_is_allowed_to_create_course()) { |
|
133
|
|
|
$lang = $translator->trans('Create course'); |
|
134
|
|
|
if ($settingsManager->getSetting('course.course_validation') == 'true') { |
|
135
|
|
|
$lang = $translator->trans('Create course request'); |
|
136
|
|
|
} |
|
137
|
|
|
|
|
138
|
|
|
$menu['courses']->addChild( |
|
139
|
|
|
'create-course', |
|
140
|
|
|
[ |
|
141
|
|
|
'label' => $lang, |
|
142
|
|
|
'route' => 'legacy_main', |
|
143
|
|
|
'routeParameters' => ['name' => 'create_course/add_course.php'], |
|
144
|
|
|
] |
|
145
|
|
|
); |
|
146
|
|
|
} |
|
147
|
|
|
|
|
148
|
|
|
if ($checker->isGranted('ROLE_ADMIN')) { |
|
149
|
|
|
$menu['courses']->addChild( |
|
150
|
|
|
$translator->trans('Add Session'), |
|
151
|
|
|
[ |
|
152
|
|
|
'route' => 'legacy_main', |
|
153
|
|
|
'routeParameters' => ['name' => 'session/session_add.php'], |
|
154
|
|
|
] |
|
155
|
|
|
); |
|
156
|
|
|
} |
|
157
|
|
|
|
|
158
|
|
|
$menu->addChild( |
|
159
|
|
|
'calendar', |
|
160
|
|
|
[ |
|
161
|
|
|
'label' => $translator->trans('Calendar'), |
|
162
|
|
|
'route' => 'legacy_main', |
|
163
|
|
|
'routeParameters' => ['name' => 'calendar/agenda_js.php'], |
|
164
|
|
|
'icon' => 'calendar-alt', |
|
165
|
|
|
] |
|
166
|
|
|
); |
|
167
|
|
|
|
|
168
|
|
|
$menu->addChild( |
|
169
|
|
|
'reports', |
|
170
|
|
|
[ |
|
171
|
|
|
'label' => $translator->trans('Reporting'), |
|
172
|
|
|
'route' => 'legacy_main', |
|
173
|
|
|
'routeParameters' => ['name' => 'mySpace/index.php'], |
|
174
|
|
|
'icon' => 'chart-bar', |
|
175
|
|
|
] |
|
176
|
|
|
); |
|
177
|
|
|
|
|
178
|
|
|
if ('true' === $settingsManager->getSetting('social.allow_social_tool')) { |
|
179
|
|
|
$menu->addChild( |
|
180
|
|
|
'social', |
|
181
|
|
|
[ |
|
182
|
|
|
'label' => $translator->trans('Social'), |
|
183
|
|
|
'route' => 'legacy_main', |
|
184
|
|
|
'routeParameters' => ['name' => 'social/home.php'], |
|
185
|
|
|
'icon' => 'heart', |
|
186
|
|
|
] |
|
187
|
|
|
); |
|
188
|
|
|
|
|
189
|
|
|
$menu['social']->addChild( |
|
190
|
|
|
$translator->trans('My profile'), |
|
191
|
|
|
[ |
|
192
|
|
|
'route' => 'legacy_main', |
|
193
|
|
|
'routeParameters' => ['name' => 'social/home.php'], |
|
194
|
|
|
] |
|
195
|
|
|
); |
|
196
|
|
|
$menu['social']->addChild( |
|
197
|
|
|
$translator->trans('My shared profile'), |
|
198
|
|
|
[ |
|
199
|
|
|
'route' => 'legacy_main', |
|
200
|
|
|
'routeParameters' => ['name' => 'social/profile.php'], |
|
201
|
|
|
] |
|
202
|
|
|
); |
|
203
|
|
|
$menu['social']->addChild( |
|
204
|
|
|
$translator->trans('Friends'), |
|
205
|
|
|
[ |
|
206
|
|
|
'route' => 'legacy_main', |
|
207
|
|
|
'routeParameters' => ['name' => 'social/friends.php'], |
|
208
|
|
|
] |
|
209
|
|
|
); |
|
210
|
|
|
$menu['social']->addChild( |
|
211
|
|
|
$translator->trans('Social Groups'), |
|
212
|
|
|
[ |
|
213
|
|
|
'route' => 'legacy_main', |
|
214
|
|
|
'routeParameters' => ['name' => 'social/groups.php'], |
|
215
|
|
|
] |
|
216
|
|
|
); |
|
217
|
|
|
$menu['social']->addChild( |
|
218
|
|
|
$translator->trans('My Files'), |
|
219
|
|
|
[ |
|
220
|
|
|
'route' => 'legacy_main', |
|
221
|
|
|
'routeParameters' => ['name' => 'social/myfiles.php'], |
|
222
|
|
|
] |
|
223
|
|
|
); |
|
224
|
|
|
} |
|
225
|
|
|
|
|
226
|
|
|
if ($checker->isGranted('ROLE_ADMIN')) { |
|
227
|
|
|
$menu->addChild( |
|
228
|
|
|
'dashboard', |
|
229
|
|
|
[ |
|
230
|
|
|
'label' => $translator->trans('Dashboard'), |
|
231
|
|
|
'route' => 'legacy_main', |
|
232
|
|
|
'routeParameters' => ['name' => 'dashboard/index.php'], |
|
233
|
|
|
'icon' => 'cube', |
|
234
|
|
|
] |
|
235
|
|
|
); |
|
236
|
|
|
|
|
237
|
|
|
$menu->addChild( |
|
238
|
|
|
'administrator', |
|
239
|
|
|
[ |
|
240
|
|
|
'label' => $translator->trans('Administration'), |
|
241
|
|
|
'route' => 'legacy_main', |
|
242
|
|
|
'routeParameters' => ['name' => 'admin/index.php'], |
|
243
|
|
|
'icon' => 'cogs', |
|
244
|
|
|
] |
|
245
|
|
|
); |
|
246
|
|
|
|
|
247
|
|
|
$menu['administrator']->addChild( |
|
248
|
|
|
'options', |
|
249
|
|
|
[ |
|
250
|
|
|
'label' => $translator->trans('All options'), |
|
251
|
|
|
'route' => 'legacy_main', |
|
252
|
|
|
'routeParameters' => ['name' => 'admin/index.php'], |
|
253
|
|
|
] |
|
254
|
|
|
); |
|
255
|
|
|
|
|
256
|
|
|
$menu['administrator']->addChild( |
|
257
|
|
|
'userlist', |
|
258
|
|
|
[ |
|
259
|
|
|
'label' => $translator->trans('User list'), |
|
260
|
|
|
'route' => 'legacy_main', |
|
261
|
|
|
'routeParameters' => ['name' => 'admin/user_list.php'], |
|
262
|
|
|
] |
|
263
|
|
|
); |
|
264
|
|
|
$menu['administrator']->addChild( |
|
265
|
|
|
'courselist', |
|
266
|
|
|
[ |
|
267
|
|
|
'label' => $translator->trans('Course list'), |
|
268
|
|
|
'route' => 'legacy_main', |
|
269
|
|
|
'routeParameters' => ['name' => 'admin/course_list.php'], |
|
270
|
|
|
] |
|
271
|
|
|
); |
|
272
|
|
|
$menu['administrator']->addChild( |
|
273
|
|
|
'sessionlist', |
|
274
|
|
|
[ |
|
275
|
|
|
'label' => $translator->trans('Session list'), |
|
276
|
|
|
'route' => 'legacy_main', |
|
277
|
|
|
'routeParameters' => ['name' => 'session/session_list.php'], |
|
278
|
|
|
] |
|
279
|
|
|
); |
|
280
|
|
|
$menu['administrator']->addChild( |
|
281
|
|
|
'languages', |
|
282
|
|
|
[ |
|
283
|
|
|
'label' => $translator->trans('Languages'), |
|
284
|
|
|
'route' => 'legacy_main', |
|
285
|
|
|
'routeParameters' => ['name' => 'admin/languages.php'], |
|
286
|
|
|
] |
|
287
|
|
|
); |
|
288
|
|
|
$menu['administrator']->addChild( |
|
289
|
|
|
'plugins', |
|
290
|
|
|
[ |
|
291
|
|
|
'label' => $translator->trans('Plugins'), |
|
292
|
|
|
'route' => 'legacy_main', |
|
293
|
|
|
'routeParameters' => ['name' => 'admin/settings.php', 'category' => 'Plugins'], |
|
294
|
|
|
] |
|
295
|
|
|
); |
|
296
|
|
|
$menu['administrator']->addChild( |
|
297
|
|
|
'settings', |
|
298
|
|
|
[ |
|
299
|
|
|
'label' => $translator->trans('Advanced settings'), |
|
300
|
|
|
'uri' => $rootWeb.'public/admin/settings/platform', |
|
301
|
|
|
] |
|
302
|
|
|
); |
|
303
|
|
|
} |
|
304
|
|
|
} |
|
305
|
|
|
|
|
306
|
|
|
$categories = $container->get('doctrine')->getRepository('ChamiloFaqBundle:Category')->retrieveActive(); |
|
307
|
|
|
if ($categories) { |
|
308
|
|
|
$faq = $menu->addChild('FAQ', ['route' => 'faq_index']); |
|
309
|
|
|
/** @var Category $category */ |
|
310
|
|
|
foreach ($categories as $category) { |
|
311
|
|
|
$faq->addChild( |
|
312
|
|
|
$category->getHeadline(), |
|
313
|
|
|
[ |
|
314
|
|
|
'route' => 'faq', |
|
315
|
|
|
'routeParameters' => [ |
|
316
|
|
|
'categorySlug' => $category->getSlug(), |
|
317
|
|
|
'questionSlug' => '', |
|
318
|
|
|
], |
|
319
|
|
|
] |
|
320
|
|
|
)->setAttribute('divider_append', true); |
|
321
|
|
|
} |
|
322
|
|
|
} |
|
323
|
|
|
|
|
324
|
|
|
// Getting site information |
|
325
|
|
|
$site = $container->get('sonata.page.site.selector'); |
|
326
|
|
|
$host = $site->getRequestContext()->getHost(); |
|
327
|
|
|
$siteManager = $container->get('sonata.page.manager.site'); |
|
328
|
|
|
/** @var Site $site */ |
|
329
|
|
|
$site = $siteManager->findOneBy([ |
|
330
|
|
|
'host' => [$host, 'localhost'], |
|
331
|
|
|
'enabled' => true, |
|
332
|
|
|
]); |
|
333
|
|
|
|
|
334
|
|
|
// Needed when loading legacy pages (inside main) |
|
335
|
|
|
$isLegacy = $container->get('request_stack')->getCurrentRequest()->get('load_legacy'); |
|
336
|
|
|
$urlAppend = $container->getParameter('url_append'); |
|
337
|
|
|
$legacyIndex = ''; |
|
338
|
|
|
if ($isLegacy) { |
|
339
|
|
|
$legacyIndex = $urlAppend.'/public'; |
|
340
|
|
|
} |
|
341
|
|
|
|
|
342
|
|
|
if ($site) { |
|
|
|
|
|
|
343
|
|
|
$pageManager = $container->get('sonata.page.manager.page'); |
|
344
|
|
|
// Parents only of homepage |
|
345
|
|
|
$criteria = ['site' => $site, 'enabled' => true, 'parent' => 1]; |
|
346
|
|
|
$pages = $pageManager->findBy($criteria); |
|
347
|
|
|
|
|
348
|
|
|
//$pages = $pageManager->loadPages($site); |
|
349
|
|
|
/** @var Page $page */ |
|
350
|
|
|
foreach ($pages as $page) { |
|
351
|
|
|
/*if ($page->getRouteName() !== 'page_slug') { |
|
352
|
|
|
continue; |
|
353
|
|
|
}*/ |
|
354
|
|
|
|
|
355
|
|
|
// Avoid home |
|
356
|
|
|
if ($page->getUrl() === '/') { |
|
357
|
|
|
continue; |
|
358
|
|
|
} |
|
359
|
|
|
|
|
360
|
|
|
if (!$page->isCms()) { |
|
361
|
|
|
continue; |
|
362
|
|
|
} |
|
363
|
|
|
|
|
364
|
|
|
$url = $legacyIndex.$page->getUrl(); |
|
365
|
|
|
|
|
366
|
|
|
$subMenu = $menu->addChild( |
|
367
|
|
|
$page->getName(), |
|
368
|
|
|
[ |
|
369
|
|
|
'route' => $page->getRouteName(), |
|
370
|
|
|
'routeParameters' => [ |
|
371
|
|
|
'path' => $url, |
|
372
|
|
|
], |
|
373
|
|
|
] |
|
374
|
|
|
); |
|
375
|
|
|
|
|
376
|
|
|
/** @var Page $child */ |
|
377
|
|
|
foreach ($page->getChildren() as $child) { |
|
378
|
|
|
$url = $legacyIndex.$child->getUrl(); |
|
379
|
|
|
$subMenu->addChild( |
|
380
|
|
|
$child->getName(), |
|
381
|
|
|
[ |
|
382
|
|
|
'route' => $page->getRouteName(), |
|
383
|
|
|
'routeParameters' => [ |
|
384
|
|
|
'path' => $url, |
|
385
|
|
|
], |
|
386
|
|
|
] |
|
387
|
|
|
)->setAttribute('divider_append', true); |
|
388
|
|
|
} |
|
389
|
|
|
} |
|
390
|
|
|
} |
|
391
|
|
|
|
|
392
|
|
|
// Set CSS classes for the items |
|
393
|
|
|
foreach ($menu->getChildren() as $child) { |
|
394
|
|
|
$childClass = ''; |
|
395
|
|
|
if ($child->hasChildren()) { |
|
396
|
|
|
$childClass = 'dropdown'; |
|
397
|
|
|
$child->setChildrenAttribute('class', 'dropdown-menu'); |
|
398
|
|
|
} |
|
399
|
|
|
|
|
400
|
|
|
$child |
|
401
|
|
|
->setLinkAttribute('class', 'sidebar-link') |
|
402
|
|
|
->setAttribute('class', 'nav-item '.$childClass); |
|
403
|
|
|
|
|
404
|
|
|
} |
|
405
|
|
|
|
|
406
|
|
|
return $menu; |
|
407
|
|
|
} |
|
408
|
|
|
|
|
409
|
|
|
/** |
|
410
|
|
|
* Course menu. |
|
411
|
|
|
* |
|
412
|
|
|
* @param FactoryInterface $factory |
|
413
|
|
|
* @param array $options |
|
414
|
|
|
* |
|
415
|
|
|
* @return ItemInterface |
|
416
|
|
|
*/ |
|
417
|
|
|
public function courseMenu(FactoryInterface $factory, array $options) |
|
418
|
|
|
{ |
|
419
|
|
|
$checker = $this->container->get('security.authorization_checker'); |
|
420
|
|
|
$menu = $factory->createItem('root'); |
|
421
|
|
|
$translator = $this->container->get('translator'); |
|
422
|
|
|
$checked = $this->container->get('session')->get('IS_AUTHENTICATED_FULLY'); |
|
423
|
|
|
$settingsManager = $this->container->get('chamilo.settings.manager'); |
|
424
|
|
|
|
|
425
|
|
|
if ($checked) { |
|
426
|
|
|
$menu->setChildrenAttribute('class', 'nav nav-pills nav-stacked'); |
|
427
|
|
|
$menu->addChild( |
|
428
|
|
|
$translator->trans('MyCourses'), |
|
429
|
|
|
[ |
|
430
|
|
|
'route' => 'userportal', |
|
431
|
|
|
'routeParameters' => ['type' => 'courses'], |
|
432
|
|
|
] |
|
433
|
|
|
); |
|
434
|
|
|
|
|
435
|
|
|
return $menu; |
|
436
|
|
|
|
|
437
|
|
|
if (api_is_allowed_to_create_course()) { |
|
|
|
|
|
|
438
|
|
|
$lang = $translator->trans('CreateCourse'); |
|
439
|
|
|
if ($settingsManager->getSetting('course.course_validation') == 'true') { |
|
440
|
|
|
$lang = $translator->trans('CreateCourseRequest'); |
|
441
|
|
|
} |
|
442
|
|
|
$menu->addChild( |
|
443
|
|
|
$lang, |
|
444
|
|
|
['route' => 'add_course'] |
|
445
|
|
|
); |
|
446
|
|
|
} |
|
447
|
|
|
|
|
448
|
|
|
$link = $this->container->get('router')->generate('web.main'); |
|
449
|
|
|
|
|
450
|
|
|
$menu->addChild( |
|
451
|
|
|
$translator->trans('ManageCourses'), |
|
452
|
|
|
[ |
|
453
|
|
|
'uri' => $link.'auth/courses.php?action=sortmycourses', |
|
454
|
|
|
] |
|
455
|
|
|
); |
|
456
|
|
|
|
|
457
|
|
|
$browse = $settingsManager->getSetting('display.allow_students_to_browse_courses'); |
|
458
|
|
|
|
|
459
|
|
|
if ($browse == 'true') { |
|
460
|
|
|
if ($checker->isGranted('ROLE_STUDENT') && !api_is_drh() && !api_is_session_admin() |
|
461
|
|
|
) { |
|
462
|
|
|
$menu->addChild( |
|
463
|
|
|
$translator->trans('CourseCatalog'), |
|
464
|
|
|
[ |
|
465
|
|
|
'uri' => $link.'auth/courses.php', |
|
466
|
|
|
] |
|
467
|
|
|
); |
|
468
|
|
|
} else { |
|
469
|
|
|
$menu->addChild( |
|
470
|
|
|
$translator->trans('Dashboard'), |
|
471
|
|
|
[ |
|
472
|
|
|
'uri' => $link.'dashboard/index.php', |
|
473
|
|
|
] |
|
474
|
|
|
); |
|
475
|
|
|
} |
|
476
|
|
|
} |
|
477
|
|
|
|
|
478
|
|
|
/** @var \Knp\Menu\MenuItem $menu */ |
|
479
|
|
|
$menu->addChild( |
|
480
|
|
|
$translator->trans('History'), |
|
481
|
|
|
[ |
|
482
|
|
|
'route' => 'userportal', |
|
483
|
|
|
'routeParameters' => [ |
|
484
|
|
|
'type' => 'sessions', |
|
485
|
|
|
'filter' => 'history', |
|
486
|
|
|
], |
|
487
|
|
|
] |
|
488
|
|
|
); |
|
489
|
|
|
} |
|
490
|
|
|
|
|
491
|
|
|
return $menu; |
|
492
|
|
|
} |
|
493
|
|
|
} |
|
494
|
|
|
|