add MenuAgent
This commit is contained in:
parent
c8c5800427
commit
44b3983356
6 changed files with 78 additions and 1 deletions
35
agents/bottomlevel/MenuAgent.inc
Normal file
35
agents/bottomlevel/MenuAgent.inc
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Legend of Z
|
||||||
|
*
|
||||||
|
* @author Oliver Hanraths <oliver.hanraths@uni-duesseldorf.de>
|
||||||
|
* @copyright 2014 Heinrich-Heine-Universität Düsseldorf
|
||||||
|
* @license http://www.gnu.org/licenses/gpl.html
|
||||||
|
* @link https://bitbucket.org/coderkun/the-legend-of-z
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace hhu\z\agents\bottomlevel;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Agent to display a menu.
|
||||||
|
*
|
||||||
|
* @author Oliver Hanraths <oliver.hanraths@uni-duesseldorf.de>
|
||||||
|
*/
|
||||||
|
class MenuAgent extends \nre\agents\BottomlevelAgent
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Action: index.
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
@ -28,6 +28,8 @@
|
||||||
*/
|
*/
|
||||||
public function index()
|
public function index()
|
||||||
{
|
{
|
||||||
|
// Add menu
|
||||||
|
$this->addSubAgent('Menu');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
35
controllers/MenuController.inc
Normal file
35
controllers/MenuController.inc
Normal file
|
|
@ -0,0 +1,35 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The Legend of Z
|
||||||
|
*
|
||||||
|
* @author Oliver Hanraths <oliver.hanraths@uni-duesseldorf.de>
|
||||||
|
* @copyright 2014 Heinrich-Heine-Universität Düsseldorf
|
||||||
|
* @license http://www.gnu.org/licenses/gpl.html
|
||||||
|
* @link https://bitbucket.org/coderkun/the-legend-of-z
|
||||||
|
*/
|
||||||
|
|
||||||
|
namespace hhu\z\controllers;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Controller of the Agent to display a menu.
|
||||||
|
*
|
||||||
|
* @author Oliver Hanraths <oliver.hanraths@uni-duesseldorf.de>
|
||||||
|
*/
|
||||||
|
class MenuController extends \hhu\z\Controller
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Action: index.
|
||||||
|
*/
|
||||||
|
public function index()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
?>
|
||||||
|
|
@ -9,7 +9,10 @@
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<h1>The Legend of Z</h1>
|
<header>
|
||||||
|
<h1>The Legend of Z</h1>
|
||||||
|
<?=$menu?>
|
||||||
|
</header>
|
||||||
<article>
|
<article>
|
||||||
<?=$intermediate?>
|
<?=$intermediate?>
|
||||||
</article>
|
</article>
|
||||||
|
|
|
||||||
2
views/html/menu/index.tpl
Normal file
2
views/html/menu/index.tpl
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
<nav>
|
||||||
|
</nav>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue