jablonka.czprosek.czf

freenet-router

Subversion Repositories:
[/] [trunk/] [freenet-router/] [var/] [www/] [freenet-router/] [Application/] [Controllers/] [Controller.php] - Blame information for rev 2

 

Line No. Rev Author Line
12simandl<?php
2 
3namespace FreenetRouter\Controllers;
4 
5use FreenetRouter\Models\UI\MenuEntry;
6use Phem\Controllers\SimpleViewController;
7use Phem\Core\Collection;
8use Phem\Environment\EnvironmentManager;
9 
10/**
11 * @author Jakub PetrŞílka <petrzilka@czweb.net>
12 */
13abstract class Controller extends SimpleViewController
14{
15 public function __construct()
16 {
17 parent::__construct();
18 
19 $this->getModel()->put("osVersion", "Freenet Router 3.1");
20 $this->getModel()->put("routerName", "TestAP");
21 $this->getModel()->put("projectLink",
22 "https://bbb.nfx.cz/projects/freenet-router");
23 
24 $loggedUser = EnvironmentManager::getSession()->getVar("loggedUser");
25 if ($loggedUser !== null)
26 {
27 $this->getModel()->put("loggedUser", $loggedUser);
28 $this->getModel()->put("login", true);
29 }
30 
31 $this->getModel()->put("mainMenu", $this->populateMainMenu());
32 $this->getModel()->put("lb", EnvironmentManager::getLinkBuilder());
33 }
34 
35 private function populateMainMenu()
36 {
37 $menu = new Collection();
38 $menu->add(new MenuEntry("Others","showPage","ostatnĂ­"));
39 $menu->add(new MenuEntry("Logs","showPage","logy"));
40 $menu->add(new MenuEntry("Graphs","showPage","grafy"));
41 $menu->add(new MenuEntry("Quagga","showPage","quagga"));
42 $menu->add(new MenuEntry("Macguard","showPage","macguard"));
43 $menu->add(new MenuEntry("Firewall","showPage","firewall"));
44 $menu->add(new MenuEntry("Monitoring","showPage","monitoring"));
45 $menu->add(new MenuEntry("Networking","showPage","nastavení sítě"));
46 return $menu;
47 }
48}

Powered by WebSVN 2.2.1