initial commit with snapshot 20140213
This commit is contained in:
43
inc/models/NavigationModel.class.php
Normal file
43
inc/models/NavigationModel.class.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
require_once('./inc/model.class.php');
|
||||
|
||||
class NavigationModel extends Model
|
||||
{
|
||||
private $linksList = array();
|
||||
private $title = '';
|
||||
|
||||
public function setForumName($fn)
|
||||
{
|
||||
$this->addLink('Forum '.$fn, 'index.php');
|
||||
$this->title = $fn. ' • ';
|
||||
}
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user