Files
uf2/inc/models/NavigationModel.class.php
PioDer a542813c8f implemented buildURL() function (and fixed redirecting on https page)
added comments block (file description) in each PHP file
2015-02-15 14:33:02 +01:00

48 lines
791 B
PHP

<?php
/**
* @package uForum2
* @file inc/models/NavigationModel.php
* @copyright 2007-2015 (c) PioDer <piotrek@pioder.pl>
* @link http://www.pioder.pl/
* @license see LICENSE.txt
**/
class NavigationModel extends Model
{
private $linksList = array();
private $title = '';
public function setForumName($fn)
{
$this->addLink('Forum '.$fn, 'index.php');
$this->title = $fn. ' &bull; ';
}
public function addLink($name, $url = '')
{
if ($url == null)
$url = $_SERVER['REQUEST_URI'];
$l = array(
'name' => $name,
'url' => $url
);
array_push($this->linksList, $l);
}
public function setSubTitle($t)
{
$this->title .= $t;
}
public function getTitle()
{
return $this->title;
}
public function getNav()
{
return $this->linksList;
}
}
?>