
Public Member Functions | |
| getPathway () | |
| setPathway ($data) | |
| addItem ($name, $givenurl='') | |
| reduceToOne () | |
| reduceByOne () | |
| getCustomPathWay () | |
| appendPathWay ($html) | |
| makePathway () | |
Static Public Member Functions | |
| static | getInstance () |
Private Member Functions | |
| __construct () | |
| __clone () | |
Private Attributes | |
| $_names = array() | |
| $_urls = array() | |
| $sef = null | |
| $custom_pathway = array() | |
Static Private Attributes | |
| static | $instance = __CLASS__ |
Definition at line 44 of file aliroPathway.php.
| aliroPathway::__construct | ( | ) | [private] |
Definition at line 51 of file aliroPathway.php.
References aliroMenuHandler::getInstance(), aliroSEF::getInstance(), and sef().
00051 { 00052 $this->sef = aliroSEF::getInstance(); 00053 if ($home = aliroMenuHandler::getInstance()->getHome()) { 00054 $this->_names[] = $home->name; 00055 $this->_urls[] = $this->sef->sefRelToAbs($home->link); 00056 } 00057 }
| aliroPathway::__clone | ( | ) | [private] |
| static aliroPathway::getInstance | ( | ) | [static] |
Definition at line 63 of file aliroPathway.php.
Referenced by aliroUserRequest::__construct(), aliroUserTemplateBase::__get(), aliroCache::call(), aliroFolderHandler::setFolderPathway(), and aliroMenuHandler::setPathway().
00063 { 00064 return is_object(self::$instance) ? self::$instance : (self::$instance = new self::$instance()); 00065 }
| aliroPathway::getPathway | ( | ) |
Definition at line 67 of file aliroPathway.php.
00067 { 00068 $data = new stdClass(); 00069 $data->names = $this->_names; 00070 $data->urls = $this->_urls; 00071 $data->custom = $this->custom_pathway; 00072 return $data; 00073 }
| aliroPathway::setPathway | ( | $ | data | ) |
Definition at line 75 of file aliroPathway.php.
00075 { 00076 $this->_names = $data->names; 00077 $this->_urls = $data->urls; 00078 $this->_custom_pathway = $data->custom; 00079 }
| aliroPathway::addItem | ( | $ | name, | |
| $ | givenurl = '' | |||
| ) |
Definition at line 81 of file aliroPathway.php.
References sef().
00081 { 00082 if (!$name) return; 00083 $next = count($this->_names); 00084 $url = $this->sef->sefRelToAbs($givenurl); 00085 if ($next > 0 AND $url AND $url == $this->_urls[$next-1]) return; 00086 $this->_names[$next] = $name; 00087 $this->_urls[$next] = $url; 00088 }
| aliroPathway::reduceToOne | ( | ) |
Definition at line 90 of file aliroPathway.php.
00090 { 00091 for ($i = count($this->_names) - 1; $i > 0; $i--) { 00092 unset($this->_names[$i]); 00093 unset($this->_urls[$i]); 00094 } 00095 }
| aliroPathway::reduceByOne | ( | ) |
| aliroPathway::getCustomPathWay | ( | ) |
| aliroPathway::appendPathWay | ( | $ | html | ) |
| aliroPathway::makePathway | ( | ) |
Definition at line 111 of file aliroPathway.php.
References $mainframe, getCustomPathWay(), mosMainFrame::getInstance(), criticalInfo::getInstance(), aliroCore::getInstance(), and sef().
00111 { 00112 $customs = $this->getCustomPathWay(); 00113 $last = count($this->_names) - 1; 00114 if (0 == $last AND 0 == count($customs)) return ''; 00115 $starthtml = $result = "<span class='pathway'>"; 00116 $config = aliroCore::getInstance(); 00117 $rootpath = criticalInfo::getInstance()->absolute_path; 00118 $mainframe = mosMainFrame::getInstance(); 00119 $imgPath = 'templates/'.$mainframe->getTemplate().'/images/arrow.png'; 00120 if (file_exists( "$rootpath/$imgPath" )) $img = "<img src='{$config->getCfg('live_site')}/$imgPath' border='0' alt='arrow' />"; 00121 else { 00122 $imgPath = '/images/M_images/arrow.png'; 00123 if (file_exists( "$rootpath/$imgPath" )) $img = "<img src='{$config->getCfg('live_site')}/images/M_images/arrow.png' alt='arrow' />"; 00124 else $img = '>'; 00125 } 00126 foreach ($this->_names as $i=>$name) { 00127 if ($i === $last AND count($customs) == 0) $result .= "$name</span>"; 00128 else { 00129 $sefurl = $this->sef->sefRelToAbs($this->_urls[$i]); 00130 $result .= "<a href='$sefurl' class='pathway'>$name</a>"; 00131 $result .= " $img "; 00132 } 00133 } 00134 $last = count($customs) - 1; 00135 foreach ($customs as $i=>$custom) $result .= ($i == $last ? strip_tags($custom).'</span>' : $custom." $img "); 00136 //return ($starthtml == $result) ? '' : $result; 00137 // This is a temporary fix for Jim Galley 00138 return ($starthtml == $result) ? '<span class="pathway">Home</span>' : $result; 00139 }
aliroPathway::$instance = __CLASS__ [static, private] |
Definition at line 45 of file aliroPathway.php.
aliroPathway::$_names = array() [private] |
Definition at line 46 of file aliroPathway.php.
aliroPathway::$_urls = array() [private] |
Definition at line 47 of file aliroPathway.php.
aliroPathway::$sef = null [private] |
Definition at line 48 of file aliroPathway.php.
aliroPathway::$custom_pathway = array() [private] |
Definition at line 49 of file aliroPathway.php.
1.5.5