~fkooman/vpn-user-portal

ref: 57df62b9a04e9b2391ca809e5ff9d76e524eceb1 vpn-user-portal/views/menu.php -rw-r--r-- 793 bytes
57df62b9François Kooman update CHANGES 1 year, 4 months ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<?php
$menuItems = [];
$menuItems['home'] = $this->t('Home');
$menuItems['configurations'] = $this->t('Configurations');
$menuItems['account'] = $this->t('Account');
$menuItems['documentation'] = $this->t('Documentation');
if ($isAdmin) {
    $menuItems['connections'] = $this->t('Connections');
    $menuItems['users'] = $this->t('Users');
    $menuItems['info'] = $this->t('Info');
    $menuItems['stats'] = $this->t('Stats');
    $menuItems['messages'] = $this->t('Messages');
    $menuItems['log'] = $this->t('Log');
}
?>
<ul>
<?php foreach ($menuItems as $menuKey => $menuText): ?>
<?php if ($menuKey === $activeItem): ?>
    <li class="active">
<?php else: ?>
    <li>
<?php endif; ?>
        <a href="<?=$this->e($menuKey); ?>"><?=$menuText; ?></a>
    </li>
<?php endforeach; ?>
</ul>