PHP Class Prado\Web\UI\WebControls\TWizard

TWizard splits a large form and presents the user with a series of smaller forms to complete. TWizard is analogous to the installation wizard commonly used to install software in Windows. The smaller forms are called wizard steps ({@link TWizardStep}, which can be accessed via {@link getWizardSteps WizardSteps}. In template, wizard steps can be added into a wizard using the following syntax, content in step 1, may contain other controls content in step 2, may contain other controls Each wizard step can be one of the following types: - Start : the first step in the wizard. - Step : the internal steps in the wizard. - Finish : the last step that allows user interaction. - Complete : the step that shows a summary to user (no interaction is allowed). - Auto : the step type is determined by wizard automatically. At any time, only one step is visible to end-users, which can be obtained by {@link getActiveStep ActiveStep}. Its index in the step collection is given by {@link getActiveStepIndex ActiveStepIndex}. Wizard content can be customized in many ways. The layout of a wizard consists of four parts: header, step content, navigation and side bar. Their content are affected by the following properties, respectively, - header: {@link setHeaderText HeaderText} and {@link setHeaderTemplate HeaderTemplate}. If both are present, the latter takes precedence. - step: {@link getWizardSteps WizardSteps}. - navigation: {@link setStartNavigationTemplate StartNavigationTemplate}, {@link setStepNavigationTemplate StepNavigationTemplate}, {@link setFinishNavigationTemplate FinishNavigationTemplate}. Default templates will be used if above templates are not set. - side bar: {@link setSideBarTemplate SideBarTemplate}. A default template will be used if this template is not set. Its visibility is toggled by {@link setShowSideBar ShowSideBar}. The style of these wizard layout components can be customized via the following style properties, - header: {@link getHeaderStyle HeaderStyle}. - step: {@link getStepStyle StepStyle}. - navigation: {@link getNavigationStyle NavigationStyle}, {@link getStartNextButtonStyle StartNextButtonStyle}, {@link getStepNextButtonStyle StepNextButtonStyle}, {@link getStepPreviousButtonStyle StepPreviousButtonStyle}, {@link getFinishPreviousButtonStyle FinishPreviousButtonStyle}, {@link getFinishCompleteButtonStyle FinishCompleteButtonStyle}, {@link getCancelButtonStyle CancelButtonStyle}. - side bar: {@link getSideBarStyle SideBarStyle} and {@link getSideBarButtonStyle SideBarButtonStyle}.
Since: 3.0
Author: Qiang Xue ([email protected])
Inheritance: extends TWebControl, implements Prado\Web\UI\INamingContainer
Afficher le fichier Open project: pradosoft/prado Class Usage Examples

Méthodes publiques

Méthode Description
addParsedObject ( $object ) Adds {@link TWizardStep} objects into step collection.
addedWizardStep ( $step ) Adds a wizard step to the multiview.
bubbleEvent ( $sender, $param ) Handles bubbled events.
createChildControls ( ) Creates child controls within the wizard
dataListItemCommand ( $sender, $param ) Event handler for sidebar datalist's OnItemCommand event.
dataListItemDataBound ( $sender, $param ) Event handler for sidebar datalist's OnItemDataBound event.
getActiveStep ( ) : TWizardStep
getActiveStepIndex ( ) : integer
getCancelButtonStyle ( ) : TWizardNavigationButtonStyle
getCancelDestinationUrl ( ) : string
getFinishCompleteButtonStyle ( ) : TWizardNavigationButtonStyle
getFinishDestinationUrl ( ) : string
getFinishNavigation ( ) : TWizardNavigationContainer
getFinishNavigationTemplate ( ) : ITemplate
getFinishPreviousButtonStyle ( ) : TWizardNavigationButtonStyle
getHeader ( ) : TPanel
getHeaderStyle ( ) : TPanelStyle
getHeaderTemplate ( ) : ITemplate
getHeaderText ( ) : string
getMultiView ( ) : TMultiView Returns the multiview that holds the wizard steps.
getNavigationButtonStyle ( ) : TStyle
getNavigationStyle ( ) : TPanelStyle
getShowCancelButton ( ) : boolean
getShowSideBar ( ) : boolean
getSideBar ( ) : TPanel
getSideBarButtonStyle ( ) : TStyle
getSideBarStyle ( ) : TPanelStyle
getSideBarTemplate ( ) : ITemplate
getStartNavigation ( ) : TWizardNavigationContainer
getStartNavigationTemplate ( ) : ITemplate
getStartNextButtonStyle ( ) : TWizardNavigationButtonStyle
getStepContent ( ) : TPanel
getStepNavigation ( ) : TWizardNavigationContainer
getStepNavigationTemplate ( ) : ITemplate
getStepNextButtonStyle ( ) : TWizardNavigationButtonStyle
getStepPreviousButtonStyle ( ) : TWizardNavigationButtonStyle
getStepStyle ( ) : TPanelStyle
getUseDefaultLayout ( ) : boolean
getWizardSteps ( ) : TWizardStepCollection
onActiveStepChanged ( $param ) Raises OnActiveStepChanged event.
onCancelButtonClick ( $param ) Raises OnCancelButtonClick event.
onCompleteButtonClick ( $param ) Raises OnCompleteButtonClick event.
onInit ( $param ) Creates the child controls of the wizard.
onNextButtonClick ( $param ) Raises OnNextButtonClick event.
onPreviousButtonClick ( $param ) Raises OnPreviousButtonClick event.
onSideBarButtonClick ( $param ) Raises OnSideBarButtonClick event.
removedWizardStep ( $step ) Removes a wizard step from the multiview.
render ( $writer ) Renders the wizard.
saveState ( ) Saves the current active step index into history.
setActiveStep ( $step )
setActiveStepIndex ( $value )
setCancelDestinationUrl ( $value )
setFinishDestinationUrl ( $value )
setFinishNavigationTemplate ( $value )
setHeaderTemplate ( $value )
setHeaderText ( $value )
setShowCancelButton ( $value )
setShowSideBar ( $value )
setSideBarTemplate ( $value )
setStartNavigationTemplate ( $value )
setStepNavigationTemplate ( $value )
setUseDefaultLayout ( $value )
wizardStepsChanged ( ) Updates the sidebar datalist if any.

Méthodes protégées

Méthode Description
allowNavigationToPreviousStep ( ) : boolean
allowNavigationToStep ( $index ) : boolean
applyControlProperties ( ) Applies various properties to the components of wizard
applyHeaderProperties ( ) Applies properties to the wizard header
applyNavigationProperties ( ) Apply properties to various navigation panels.
applySideBarProperties ( ) Applies properties to the wizard sidebar
applyStepContentProperties ( ) Applies properties to the wizard step content
createFinishNavigation ( ) Creates finish navigation panel.
createHeader ( ) Creates the wizard header.
createNavigation ( ) Creates navigation panel.
createSideBar ( ) Creates the wizard side bar
createStartNavigation ( ) Creates start navigation panel.
createStepContent ( ) Creates wizard step content.
createStepNavigation ( ) Creates step navigation panel.
getHistory ( ) : TStack
getPreviousStepIndex ( $popStack ) Determines the index of the previous step based on history.
getStepType ( $wizardStep ) : TWizardStepType Determines the type of the specified wizard step.
getTagName ( ) : string
requiresControlsRecreation ( ) Indicates the wizard needs to recreate all child controls.
reset ( ) Clears up everything within the wizard.

Method Details

addParsedObject() public méthode

This method overrides the parent implementation and is invoked when template is being instantiated.
public addParsedObject ( $object )

addedWizardStep() public méthode

This method should only be used by control developers. It is invoked when a step is added into the step collection of the wizard.
public addedWizardStep ( $step )

allowNavigationToPreviousStep() protected méthode

protected allowNavigationToPreviousStep ( ) : boolean
Résultat boolean whether navigation to the previous step is allowed

allowNavigationToStep() protected méthode

protected allowNavigationToStep ( $index ) : boolean
Résultat boolean whether navigation to the specified step is allowed

applyControlProperties() protected méthode

Applies various properties to the components of wizard
protected applyControlProperties ( )

applyHeaderProperties() protected méthode

Applies properties to the wizard header
protected applyHeaderProperties ( )

applyNavigationProperties() protected méthode

Apply properties to various navigation panels.

applySideBarProperties() protected méthode

Applies properties to the wizard sidebar
protected applySideBarProperties ( )

applyStepContentProperties() protected méthode

Applies properties to the wizard step content

bubbleEvent() public méthode

This method mainly translate certain command events into wizard-specific events.
public bubbleEvent ( $sender, $param )

createChildControls() public méthode

Creates child controls within the wizard
public createChildControls ( )

createFinishNavigation() protected méthode

Creates finish navigation panel.
protected createFinishNavigation ( )

createHeader() protected méthode

Creates the wizard header.
protected createHeader ( )

createNavigation() protected méthode

Creates navigation panel.
protected createNavigation ( )

createSideBar() protected méthode

Creates the wizard side bar
protected createSideBar ( )

createStartNavigation() protected méthode

Creates start navigation panel.
protected createStartNavigation ( )

createStepContent() protected méthode

Creates wizard step content.
protected createStepContent ( )

createStepNavigation() protected méthode

Creates step navigation panel.
protected createStepNavigation ( )

dataListItemCommand() public méthode

This method is used internally by wizard. It mainly sets the active step index according to the button clicked in the sidebar.
public dataListItemCommand ( $sender, $param )

dataListItemDataBound() public méthode

This method is used internally by wizard. It mainly configures the buttons in the sidebar datalist.
public dataListItemDataBound ( $sender, $param )

getActiveStep() public méthode

public getActiveStep ( ) : TWizardStep
Résultat TWizardStep the currently active wizard step

getActiveStepIndex() public méthode

public getActiveStepIndex ( ) : integer
Résultat integer the zero-based index of the active wizard step

getCancelButtonStyle() public méthode

public getCancelButtonStyle ( ) : TWizardNavigationButtonStyle
Résultat TWizardNavigationButtonStyle the style for the cancel button

getCancelDestinationUrl() public méthode

public getCancelDestinationUrl ( ) : string
Résultat string the URL that the browser will be redirected to if the cancel button in the wizard is clicked. Defaults to ''.

getFinishCompleteButtonStyle() public méthode

public getFinishCompleteButtonStyle ( ) : TWizardNavigationButtonStyle
Résultat TWizardNavigationButtonStyle the style for the complete button in the finish wizard step.

getFinishDestinationUrl() public méthode

public getFinishDestinationUrl ( ) : string
Résultat string the URL that the browser will be redirected to if the wizard finishes. Defaults to ''.

getFinishNavigation() public méthode

public getFinishNavigation ( ) : TWizardNavigationContainer
Résultat TWizardNavigationContainer container of the finish navigation

getFinishNavigationTemplate() public méthode

public getFinishNavigationTemplate ( ) : ITemplate
Résultat ITemplate navigation template for the finish step. Defaults to null.

getFinishPreviousButtonStyle() public méthode

public getFinishPreviousButtonStyle ( ) : TWizardNavigationButtonStyle
Résultat TWizardNavigationButtonStyle the style for the previous button in the start wizard step.

getHeader() public méthode

public getHeader ( ) : TPanel
Résultat TPanel container of the wizard header

getHeaderStyle() public méthode

public getHeaderStyle ( ) : TPanelStyle
Résultat TPanelStyle the style for the header.

getHeaderTemplate() public méthode

public getHeaderTemplate ( ) : ITemplate
Résultat ITemplate template for wizard header. Defaults to null.

getHeaderText() public méthode

public getHeaderText ( ) : string
Résultat string header text. Defaults to ''.

getHistory() protected méthode

protected getHistory ( ) : TStack
Résultat Prado\Collections\TStack history containing step indexes that were navigated before

getMultiView() public méthode

This method should only be used by control developers.
public getMultiView ( ) : TMultiView
Résultat TMultiView the multiview holding wizard steps

getNavigationButtonStyle() public méthode

public getNavigationButtonStyle ( ) : TStyle
Résultat TStyle the style common for all navigation buttons.

getNavigationStyle() public méthode

public getNavigationStyle ( ) : TPanelStyle
Résultat TPanelStyle the style for the navigation panel.

getPreviousStepIndex() protected méthode

Determines the index of the previous step based on history.
protected getPreviousStepIndex ( $popStack )

getShowCancelButton() public méthode

public getShowCancelButton ( ) : boolean
Résultat boolean whether to display a cancel button in each wizard step. Defaults to false.

getShowSideBar() public méthode

public getShowSideBar ( ) : boolean
Résultat boolean whether to display a side bar that contains links to wizard steps. Defaults to true.

getSideBar() public méthode

public getSideBar ( ) : TPanel
Résultat TPanel container of the wizard side bar

getSideBarButtonStyle() public méthode

public getSideBarButtonStyle ( ) : TStyle
Résultat TStyle the style for the buttons displayed in the side bar.

getSideBarStyle() public méthode

public getSideBarStyle ( ) : TPanelStyle
Résultat TPanelStyle the style for the side bar.

getSideBarTemplate() public méthode

public getSideBarTemplate ( ) : ITemplate
Résultat ITemplate template for the side bar. Defaults to null.

getStartNavigation() public méthode

public getStartNavigation ( ) : TWizardNavigationContainer
Résultat TWizardNavigationContainer container of the start navigation

getStartNavigationTemplate() public méthode

public getStartNavigationTemplate ( ) : ITemplate
Résultat ITemplate navigation template for the start step. Defaults to null.

getStartNextButtonStyle() public méthode

public getStartNextButtonStyle ( ) : TWizardNavigationButtonStyle
Résultat TWizardNavigationButtonStyle the style for the next button in the start wizard step.

getStepContent() public méthode

public getStepContent ( ) : TPanel
Résultat TPanel container of the wizard step content

getStepNavigation() public méthode

public getStepNavigation ( ) : TWizardNavigationContainer
Résultat TWizardNavigationContainer container of the step navigation

getStepNavigationTemplate() public méthode

public getStepNavigationTemplate ( ) : ITemplate
Résultat ITemplate navigation template for internal steps. Defaults to null.

getStepNextButtonStyle() public méthode

public getStepNextButtonStyle ( ) : TWizardNavigationButtonStyle
Résultat TWizardNavigationButtonStyle the style for the next button in each internal wizard step.

getStepPreviousButtonStyle() public méthode

public getStepPreviousButtonStyle ( ) : TWizardNavigationButtonStyle
Résultat TWizardNavigationButtonStyle the style for the previous button in the start wizard step.

getStepStyle() public méthode

public getStepStyle ( ) : TPanelStyle
Résultat TPanelStyle the style for each internal wizard step.

getStepType() protected méthode

Determines the type of the specified wizard step.
protected getStepType ( $wizardStep ) : TWizardStepType
Résultat TWizardStepType type of the step

getTagName() protected méthode

protected getTagName ( ) : string
Résultat string tag name for the wizard

getUseDefaultLayout() public méthode

public getUseDefaultLayout ( ) : boolean
Résultat boolean whether to use default layout to arrange side bar and the rest wizard components. Defaults to true.

getWizardSteps() public méthode

public getWizardSteps ( ) : TWizardStepCollection
Résultat TWizardStepCollection collection of wizard steps

onActiveStepChanged() public méthode

This event is raised when the current visible step is changed in the wizard.
public onActiveStepChanged ( $param )

onCancelButtonClick() public méthode

This event is raised when a cancel navigation button is clicked in the current active step.
public onCancelButtonClick ( $param )

onCompleteButtonClick() public méthode

This event is raised when a finish navigation button is clicked in the current active step.
public onCompleteButtonClick ( $param )

onInit() public méthode

This method overrides the parent implementation.
public onInit ( $param )

onNextButtonClick() public méthode

This event is raised when a next navigation button is clicked in the current active step.
public onNextButtonClick ( $param )

onPreviousButtonClick() public méthode

This event is raised when a previous navigation button is clicked in the current active step.
public onPreviousButtonClick ( $param )

onSideBarButtonClick() public méthode

This event is raised when a link button in the side bar is clicked.
public onSideBarButtonClick ( $param )

removedWizardStep() public méthode

This method should only be used by control developers. It is invoked when a step is removed from the step collection of the wizard.
public removedWizardStep ( $step )

render() public méthode

Renders the wizard.
public render ( $writer )

requiresControlsRecreation() protected méthode

Indicates the wizard needs to recreate all child controls.

reset() protected méthode

Clears up everything within the wizard.
protected reset ( )

saveState() public méthode

This method is invoked by the framework when the control state is being saved.
public saveState ( )

setActiveStep() public méthode

public setActiveStep ( $step )

setActiveStepIndex() public méthode

public setActiveStepIndex ( $value )

setCancelDestinationUrl() public méthode

public setCancelDestinationUrl ( $value )

setFinishDestinationUrl() public méthode

public setFinishDestinationUrl ( $value )

setFinishNavigationTemplate() public méthode

public setFinishNavigationTemplate ( $value )

setHeaderTemplate() public méthode

public setHeaderTemplate ( $value )

setHeaderText() public méthode

public setHeaderText ( $value )

setShowCancelButton() public méthode

public setShowCancelButton ( $value )

setShowSideBar() public méthode

public setShowSideBar ( $value )

setSideBarTemplate() public méthode

public setSideBarTemplate ( $value )

setStartNavigationTemplate() public méthode

public setStartNavigationTemplate ( $value )

setStepNavigationTemplate() public méthode

public setStepNavigationTemplate ( $value )

setUseDefaultLayout() public méthode

public setUseDefaultLayout ( $value )

wizardStepsChanged() public méthode

This method is invoked when any wizard step is changed.
public wizardStepsChanged ( )