Mage_Customer_Block_Account_Navigation Class Reference

Inheritance diagram for Mage_Customer_Block_Account_Navigation:

Mage_Core_Block_Template Mage_Core_Block_Abstract Varien_Object

List of all members.

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


Detailed Description

Definition at line 35 of file Navigation.php.


Member Function Documentation

_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 (  ) 

Definition at line 59 of file Navigation.php.

00060     {
00061         return $this->_links;
00062     }

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     }


Member Data Documentation

$_activeLink = false [protected]

Definition at line 40 of file Navigation.php.

$_links = array() [protected]

Definition at line 38 of file Navigation.php.


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:24:02 2009 for Magento by  doxygen 1.5.8