| 1 |
www |
1 |
<?php
|
|
|
2 |
$currentUser = $this->currentUserHelper();
|
|
|
3 |
$session_user_id = $currentUser->getUserId();
|
|
|
4 |
$session_usertype_id = $currentUser->getUserTypeId();
|
|
|
5 |
|
|
|
6 |
$acl = $this->viewModel()->getCurrent()->getVariable('acl');
|
|
|
7 |
$container = $this->navigation('backendNavigation')->getContainer();
|
|
|
8 |
?>
|
|
|
9 |
<nav>
|
|
|
10 |
<ul>
|
|
|
11 |
<?php foreach($container as $page) :
|
|
|
12 |
|
|
|
13 |
if(!$page || !$page->getRoute() || !$acl->isAllowed($session_usertype_id , $page->getRoute())) {
|
|
|
14 |
continue;
|
|
|
15 |
}
|
|
|
16 |
|
|
|
17 |
$childs = $page->getPages();
|
|
|
18 |
$href = $childs ? '#' : $page->getHref();
|
|
|
19 |
?>
|
|
|
20 |
<li>
|
|
|
21 |
<a href="<?php echo $href ?>" title="">
|
|
|
22 |
<span><i class="<?php echo $page->getClass() ?>"></i></span>
|
|
|
23 |
<?php echo $page->getLabel() ?>
|
|
|
24 |
</a>
|
|
|
25 |
<?php
|
|
|
26 |
$childs = $page->getPages();
|
|
|
27 |
if($childs) :
|
|
|
28 |
?>
|
|
|
29 |
<ul>
|
|
|
30 |
<?php foreach($childs as $child) :
|
|
|
31 |
if(!$acl->isAllowed($session_usertype_id , $child->getRoute())) {
|
|
|
32 |
continue;
|
|
|
33 |
}
|
|
|
34 |
?>
|
|
|
35 |
|
|
|
36 |
<li><a class="text-submenu" href="<?php echo $child->getHref() ?>" title=""><?php echo $child->getLabel() ?></a></li>
|
|
|
37 |
<?php endforeach; ?>
|
|
|
38 |
</ul>
|
|
|
39 |
<?php endif; ?>
|
|
|
40 |
</li>
|
|
|
41 |
<?php endforeach; ?>
|
|
|
42 |
</ul>
|
|
|
43 |
</nav><!--nav end-->
|