Mage_Install_Model_Wizard Class Reference

List of all members.

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


Detailed Description

Definition at line 34 of file Wizard.php.


Constructor & Destructor Documentation

__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     }


Member Function Documentation

_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

Parameters:
string $controller
string $action
Returns:
string

Definition at line 125 of file Wizard.php.

00126     {
00127         return 'install/'.$controller.'/'.$action;
00128     }

getStepByName ( name  ) 

Get wizard step by name

Parameters:
string $name
Returns:
Varien_Object || false

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

Parameters:
Mage_Core_Controller_Zend_Request $request
Returns:
Varien_Object || false

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

Get all wizard steps

Returns:
array

Definition at line 108 of file Wizard.php.

00109     {
00110         return $this->_steps;
00111     }


Member Data Documentation

$_steps = array() [protected]

Definition at line 41 of file Wizard.php.


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

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