freenet-router |
Subversion Repositories: |
Compare with Previous - Blame - Download
<?php
namespace FreenetRouter\Models\UI;
use Phem\Core\Object;
use Phem\Environment\EnvironmentManager;
/**
* @author Jakub PetrĹžĂlka <kubapet@lbcfree.net>
*/
class MenuEntry extends Object
{
private $controller;
private $task;
private $title;
function __construct($controller, $task, $title)
{
$this->controller = $controller;
$this->task = $task;
$this->title = $title;
}
public function getController()
{
return $this->controller;
}
public function getTask()
{
return $this->task;
}
public function getTitle()
{
return $this->title;
}
public function setController($controller)
{
$this->controller = $controller;
}
public function setTask($task)
{
$this->task = $task;
}
public function setTitle($title)
{
$this->title = $title;
}
public function getUrl()
{
$lb = EnvironmentManager::getLinkBuilder();
return $lb->navigate($this->controller, $this->task);
}
}