Class WizardAction

Description

This class is an abstract class that provides a structure for building actions

that contain Wizards. Decendent actions are not required to contain Wizards, though if they do, they should implement the following methods:

    To run the entire wizard execution sequence, only runWizard() needs to be called. Example:
    1. <?php
    2. ...
    3.  
    4. &#109;**
    5. * Build the content for this action
    6. *
    7. * @return boolean
    8. * @access public
    9. * @since 4/26/05
    10. *&#109;
    11. function buildContent () {
    12. $centerPane =$this->getCenterPane();
    13. $assetId =$this->getAssetId();
    14. $cacheName = 'edit_asset_wizard_'.$assetId->getIdString();
    15.  
    16. $this->runWizard ( $cacheName, $centerPane );
    17. }
    18.  
    19. ...
    20. ?>

    • version: $Id: WizardAction.class.php,v 1.15 2007/09/19 14:04:41 adamfranco Exp $
    • license: GNU General Public License (GPL)
    • copyright: Copyright &copy; 2005, Middlebury College
    • since: 4/28/05

    Located in /polyphony/main/library/AbstractActions/WizardAction.class.php (line 55)

    Action
       |
       --WizardAction
    Direct descendents
    Class Description
    MainWindowAction The MainWindowAction is an abstract class that provides a standard way of setting up and executing an action in the main window of the application. It provides a structure for accessing various parts of this main window, as well as delegating the implementation of some methods to decendent classes.
    Method Summary
    void cancelWizard (string $cacheName)
    string cleanCacheName (string $cacheName)
    void closeWizard (string $cacheName)
    string getReturnUrl ()
    object Wizard getWizard (string $cacheName)
    void runWizard (string $cacheName, object Container $container)
    boolean saveWizard (string $cacheName)
    Methods
    cancelWizard (line 105)

    Cancel from this Wizard. This will tear down the wizard and return us to our returnUrl as specified by getReturnUrl().

    • since: 4/28/05
    • access: public
    void cancelWizard (string $cacheName)
    • string $cacheName
    cleanCacheName (line 217)

    Clean the cacheName

    • since: 9/28/06
    • access: public
    string cleanCacheName (string $cacheName)
    • string $cacheName
    closeWizard (line 118)

    Close the Wizard. This will tear down the Wizard.

    • since: 4/28/05
    • access: public
    void closeWizard (string $cacheName)
    • string $cacheName
    createWizard (line 67)

    Create a new Wizard for this action. Caching of this Wizard is handled by getWizard() and does not need to be implemented here.

    • since: 4/28/05
    • access: public
    object Wizard createWizard ()

    Redefined in descendants as:
    getReturnUrl (line 92)

    Return the URL that this action should return to when completed.

    • since: 4/28/05
    • access: public
    string getReturnUrl ()

    Redefined in descendants as:
    getWizard (line 195)

    Build and/or return our Wizard. Handle caching of it in the SESSION under the specified name.

    • since: 4/28/05
    • access: public
    object Wizard getWizard (string $cacheName)
    • string $cacheName
    runWizard (line 162)

    Run this Action's wizard and add it to the specified container. Cache this Action's wizard with the specified cacheName.

    This is the only method that an Action needs to call to run itself, see editAction::buildContent() for an example:

    1. <?php
    2. ...
    3.  
    4. &#109;**
    5. * Build the content for this action
    6. *
    7. * @return boolean
    8. * @access public
    9. * @since 4/26/05
    10. *&#109;
    11. function buildContent () {
    12. $centerPane =$this->getCenterPane();
    13. $assetId =$this->getAssetId();
    14. $cacheName = 'edit_asset_wizard_'.$assetId->getIdString();
    15.  
    16. $this->runWizard ( $cacheName, $centerPane );
    17. }
    18.  
    19. ...
    20. ?>

    • since: 4/28/05
    • access: public
    void runWizard (string $cacheName, object Container $container)
    • string $cacheName: The name to cache this Action's Wizard with.
    • object Container $container: The container to put the Wizard's layout in.
    saveWizard (line 81)

    Save our results. Tearing down and unsetting the Wizard is handled by in runWizard() and does not need to be implemented here.

    • return: TRUE if save was successful and tear-down/cleanup of the Wizard should ensue.
    • since: 4/28/05
    • access: public
    boolean saveWizard (string $cacheName)
    • string $cacheName

    Redefined in descendants as:

    Inherited Methods

    Inherited From Action

    Action::execute()
    Action::getHeadingText()
    Action::getUnauthorizedMessage()
    Action::isAuthorizedToExecute()
    Action::requestedAction()
    Action::requestedModule()

    Documentation generated on Wed, 19 Sep 2007 10:28:03 -0400 by phpDocumentor 1.3.0RC3