コード例 #1
0
 public function index()
 {
     $this->setup = array("title" => "Dashboard");
     Menu::setActiveMenu('dashboard');
     $this->content = "pages/dashboard/dashboard.php";
     $this->render();
 }
コード例 #2
0
 public function viewList()
 {
     $this->setup = array("title" => "Member List");
     Menu::setActiveParent('members');
     Menu::setActiveMenu('member_list');
     $this->content = "pages/members/list.php";
     $this->render();
 }
コード例 #3
0
 public function edit()
 {
     if (!Authentication::authRole(['staff'])) {
         View::redirect('./');
         return;
     }
     $this->setup = array("title" => "Edit Staff Profile");
     Menu::setActiveParent('staff_profile');
     Menu::setActiveMenu('staff_profile_edit');
     $this->content = "pages/staff-profile/edit.php";
     $this->render();
 }
コード例 #4
0
ファイル: sidebar.php プロジェクト: bahrul221/tc-tgm
<?php

use App\View\Menu;
?>

<div id="site_sidebar">
    <nav id="sidebar_nav">
        <ul>
            <?php 
$menus = Menu::getMenu();
foreach ($menus as $menu) {
    if (count($menu['sub']) > 0) {
        echo '<li class="nav-item ' . $menu['open'] . '">';
        echo '<a href="' . $menu['url'] . '" class="nav-toggle ' . $menu['active'] . '">';
        echo '<span class=" nav-icon"><i class="' . $menu['icon'] . '"></i></span> ';
        echo '<span class="nav-title">' . $menu['title'] . '</span>';
        echo '<span class="nav-arrow"></span>';
        echo '</a>';
        echo '<ul class="sub-nav">';
        foreach ($menu['sub'] as $sub) {
            echo '<li class="nav-item ' . $sub['active'] . '">';
            echo '<a href="' . $sub['url'] . '">';
            echo '<span class=" nav-icon"><i class="' . $sub['icon'] . '"></i></span> ';
            echo '<span class="nav-title">' . $sub['title'] . '</span>';
            echo '</a>';
            echo '</li>';
        }
        echo '</ul>';
        echo '</li>';
    } else {
        echo '<li class="nav-item ' . $menu['active'] . '">';