Public Member Functions | |
addLink ($name, $path, $label, $urlParams=array()) | |
setActive ($path) | |
getLinks () | |
isActive ($link) | |
Protected Member Functions | |
_completePath ($path) | |
Protected Attributes | |
$_links = array() | |
$_activeLink = false |
Definition at line 35 of file Navigation.php.
_completePath | ( | $ | path | ) | [protected] |
Definition at line 75 of file Navigation.php.
00076 { 00077 $path = rtrim($path, '/'); 00078 switch (sizeof(explode('/', $path))) { 00079 case 1: 00080 $path .= '/index'; 00081 // no break 00082 00083 case 2: 00084 $path .= '/index'; 00085 } 00086 return $path; 00087 }
addLink | ( | $ | name, | |
$ | path, | |||
$ | label, | |||
$ | urlParams = array() | |||
) |
Definition at line 42 of file Navigation.php.
00043 { 00044 $this->_links[$name] = new Varien_Object(array( 00045 'name' => $name, 00046 'path' => $path, 00047 'label' => $label, 00048 'url' => $this->getUrl($path, $urlParams), 00049 )); 00050 return $this; 00051 }
getLinks | ( | ) |
isActive | ( | $ | link | ) |
Definition at line 64 of file Navigation.php.
00065 { 00066 if (empty($this->_activeLink)) { 00067 $this->_activeLink = $this->getAction()->getFullActionName('/'); 00068 } 00069 if ($this->_completePath($link->getPath()) == $this->_activeLink) { 00070 return true; 00071 } 00072 return false; 00073 }
setActive | ( | $ | path | ) |
Definition at line 53 of file Navigation.php.
00054 { 00055 $this->_activeLink = $this->_completePath($path); 00056 return $this; 00057 }
$_activeLink = false [protected] |
Definition at line 40 of file Navigation.php.
$_links = array() [protected] |
Definition at line 38 of file Navigation.php.