Public Member Functions | |
__construct () | |
getStepByRequest (Zend_Controller_Request_Abstract $request) | |
getStepByName ($name) | |
getSteps () | |
Protected Member Functions | |
_getUrl ($controller, $action) | |
_getUrlPath ($controller, $action) | |
Protected Attributes | |
$_steps = array() |
Definition at line 34 of file Wizard.php.
__construct | ( | ) |
Definition at line 43 of file Wizard.php.
00044 { 00045 $this->_steps = Mage::getSingleton('install/config')->getWizardSteps(); 00046 00047 foreach ($this->_steps as $index => $step) { 00048 $this->_steps[$index]->setUrl( 00049 $this->_getUrl($this->_steps[$index]->getController(), $this->_steps[$index]->getAction()) 00050 ); 00051 00052 if (isset($this->_steps[$index+1])) { 00053 $this->_steps[$index]->setNextUrl( 00054 $this->_getUrl($this->_steps[$index+1]->getController(), $this->_steps[$index+1]->getAction()) 00055 ); 00056 $this->_steps[$index]->setNextUrlPath( 00057 $this->_getUrlPath($this->_steps[$index+1]->getController(), $this->_steps[$index+1]->getAction()) 00058 ); 00059 } 00060 if (isset($this->_steps[$index-1])) { 00061 $this->_steps[$index]->setPrevUrl( 00062 $this->_getUrl($this->_steps[$index-1]->getController(), $this->_steps[$index-1]->getAction()) 00063 ); 00064 $this->_steps[$index]->setPrevUrlPath( 00065 $this->_getUrlPath($this->_steps[$index-1]->getController(), $this->_steps[$index-1]->getAction()) 00066 ); 00067 } 00068 } 00069 }
_getUrl | ( | $ | controller, | |
$ | action | |||
) | [protected] |
Definition at line 113 of file Wizard.php.
00114 { 00115 return Mage::getUrl($this->_getUrlPath($controller, $action)); 00116 }
_getUrlPath | ( | $ | controller, | |
$ | action | |||
) | [protected] |
Retrieve Url Path
string | $controller | |
string | $action |
Definition at line 125 of file Wizard.php.
getStepByName | ( | $ | name | ) |
Get wizard step by name
string | $name |
Definition at line 93 of file Wizard.php.
00094 { 00095 foreach ($this->_steps as $step) { 00096 if ($step->getName() == $name) { 00097 return $step; 00098 } 00099 } 00100 return false; 00101 }
getStepByRequest | ( | Zend_Controller_Request_Abstract $ | request | ) |
Get wizard step by request
Mage_Core_Controller_Zend_Request | $request |
Definition at line 77 of file Wizard.php.
00078 { 00079 foreach ($this->_steps as $step) { 00080 if ($step->getController() == $request->getControllerName() && $step->getAction() == $request->getActionName()) { 00081 return $step; 00082 } 00083 } 00084 return false; 00085 }
getSteps | ( | ) |
$_steps = array() [protected] |
Definition at line 41 of file Wizard.php.