1 <?php
3 class pathNavigator
4 {
6 static function registerPlugin($class)
7 {
8 $str = "";
9 if($class instanceOf management && isset($class->plHeadline)){
10 $str = "<b>"._($class->plHeadline)."</b>";
11 }elseif($class instanceOf plugin && isset($class->plHeadline)){
12 # $str = _($class->plHeadline);
13 }elseif($class instanceOf plugin && !isset($class->plHeadline)){
14 $str = "{".get_class($class)."}";
15 }elseif($class instanceOf tabs){
16 $str = $class->dn;
17 }elseif(is_string($class)){
18 $str = $class;
19 }
21 if(!empty($str)){
22 $cur = session::get('pathNavigator::position');
23 if(empty($cur)){
24 $cur.= "<li class='left left-border path-element'>{$str}</li>";
25 }else{
26 $cur.= "<li class='left path-element'>{$str}</li>";
27 }
28 session::set('pathNavigator::position', $cur);
29 }
30 }
32 static function getCurrentPath()
33 {
34 $path = session::get('pathNavigator::position');
35 if(empty($path)){
36 $path = "<li class='left left-border path-element'>Welcome to GOsa</li>";
37 }
38 return($path);
39 }
41 static function clear()
42 {
43 session::set('pathNavigator::position','');
44 }
45 }
47 // vim:tabstop=2:expandtab:shiftwidth=2:filetype=php:syntax:ruler:
48 ?>