A new, object-oriented, better vesion of μForum
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
772 B

  1. <?php
  2. /**
  3. * @package uForum2
  4. * @file inc/models/NavigationModel.php
  5. * @copyright 2007-2015 (c) PioDer
  6. * @link http://www.pioder.pl/
  7. * @license see LICENSE.txt
  8. **/
  9. class NavigationModel extends Model
  10. {
  11. private $linksList = array();
  12. private $title = '';
  13. public function setForumName($fn)
  14. {
  15. $this->addLink('Forum '.$fn, 'index.php');
  16. $this->title = $fn. ' &bull; ';
  17. }
  18. public function addLink($name, $url = '')
  19. {
  20. if ($url == null)
  21. $url = $_SERVER['REQUEST_URI'];
  22. $l = array(
  23. 'name' => $name,
  24. 'url' => $url
  25. );
  26. array_push($this->linksList, $l);
  27. }
  28. public function setSubTitle($t)
  29. {
  30. $this->title .= $t;
  31. }
  32. public function getTitle()
  33. {
  34. return $this->title;
  35. }
  36. public function getNav()
  37. {
  38. return $this->linksList;
  39. }
  40. }
  41. ?>