Source for file navigation.php

Documentation is available at navigation.php

  1. <?php
  2.  
  3. class pl_olga_files_navigation {
  4.  
  5. var $_object;
  6. var $_path;
  7.  
  8. function pl_olga_files_navigation() {
  9. global $argv;
  10.  
  11. $this->_object = null;
  12. array_shift($argv);
  13. $this->_path=$argv;
  14.  
  15. }
  16.  
  17.  
  18. function is_internal() {
  19. return false;
  20. }
  21.  
  22.  
  23. function get_leaves() {
  24. global $argv;
  25. $leaves = array ();
  26. $topic = $this->_object;
  27. $tmppath = "";
  28. foreach($this->_path as $item){
  29. $tmppath.="$item/";
  30. $leaves[$item] = array (
  31. MIDCOM_NAV_SITE => Array (
  32. MIDCOM_NAV_URL => "/".$topic->name."/".$tmppath,
  33. MIDCOM_NAV_NAME => $item),
  34. MIDCOM_NAV_ADMIN => Array (
  35. MIDCOM_NAV_URL => "",
  36. MIDCOM_NAV_NAME => ""),
  37. MIDCOM_NAV_VISIBLE => true,
  38. MIDCOM_META_CREATOR => $topic->creator,
  39. MIDCOM_META_EDITOR => $topic->revisor,
  40. MIDCOM_META_CREATED => $topic->created,
  41. MIDCOM_META_EDITED => $topic->revised
  42. );
  43. }
  44. return $leaves;
  45. }
  46.  
  47.  
  48. function get_node() {
  49. $topic = $this->_object;
  50. return array (
  51. MIDCOM_NAV_URL => "/".$topic->name,
  52. MIDCOM_NAV_NAME => $topic->extra,
  53. MIDCOM_NAV_VISIBLE => true,
  54. MIDCOM_META_CREATOR => $topic->creator,
  55. MIDCOM_META_EDITOR => $topic->revisor,
  56. MIDCOM_META_CREATED => $topic->created,
  57. MIDCOM_META_EDITED => $topic->revised
  58. );
  59. }
  60.  
  61.  
  62. function set_object($object) {
  63. debug_add ("Component: setting NAP Element to " . $object->name .
  64. " [" . $object->id . "]");
  65. $this->_object = $object;
  66. return true;
  67. }
  68.  
  69.  
  70. function get_current_leaf() {
  71.  
  72. return $GLOBALS["pl_olga_files_nap_activeid"];
  73. }
  74.  
  75. }
  76.  
  77. ?>

Documentation generated on Mon, 21 Nov 2005 18:19:44 +0100 by phpDocumentor 1.3.0RC3