PHP Класс 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}.
С версии: 3.0
Автор: Qiang Xue ([email protected])
Наследование: extends TWebControl, implements Prado\Web\UI\INamingContainer
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
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.

Защищенные методы

Метод Описание
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.

Описание методов

addParsedObject() публичный Метод

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

addedWizardStep() публичный Метод

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 allowNavigationToPreviousStep ( ) : boolean
Результат boolean whether navigation to the previous step is allowed

allowNavigationToStep() защищенный Метод

protected allowNavigationToStep ( $index ) : boolean
Результат boolean whether navigation to the specified step is allowed

applyControlProperties() защищенный Метод

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

applyHeaderProperties() защищенный Метод

Applies properties to the wizard header
protected applyHeaderProperties ( )

applyNavigationProperties() защищенный Метод

Apply properties to various navigation panels.

applySideBarProperties() защищенный Метод

Applies properties to the wizard sidebar
protected applySideBarProperties ( )

applyStepContentProperties() защищенный Метод

Applies properties to the wizard step content

bubbleEvent() публичный Метод

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

createChildControls() публичный Метод

Creates child controls within the wizard
public createChildControls ( )

createFinishNavigation() защищенный Метод

Creates finish navigation panel.
protected createFinishNavigation ( )

createHeader() защищенный Метод

Creates the wizard header.
protected createHeader ( )

createNavigation() защищенный Метод

Creates navigation panel.
protected createNavigation ( )

createSideBar() защищенный Метод

Creates the wizard side bar
protected createSideBar ( )

createStartNavigation() защищенный Метод

Creates start navigation panel.
protected createStartNavigation ( )

createStepContent() защищенный Метод

Creates wizard step content.
protected createStepContent ( )

createStepNavigation() защищенный Метод

Creates step navigation panel.
protected createStepNavigation ( )

dataListItemCommand() публичный Метод

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() публичный Метод

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

getActiveStep() публичный Метод

public getActiveStep ( ) : TWizardStep
Результат TWizardStep the currently active wizard step

getActiveStepIndex() публичный Метод

public getActiveStepIndex ( ) : integer
Результат integer the zero-based index of the active wizard step

getCancelButtonStyle() публичный Метод

public getCancelButtonStyle ( ) : TWizardNavigationButtonStyle
Результат TWizardNavigationButtonStyle the style for the cancel button

getCancelDestinationUrl() публичный Метод

public getCancelDestinationUrl ( ) : string
Результат string the URL that the browser will be redirected to if the cancel button in the wizard is clicked. Defaults to ''.

getFinishCompleteButtonStyle() публичный Метод

public getFinishCompleteButtonStyle ( ) : TWizardNavigationButtonStyle
Результат TWizardNavigationButtonStyle the style for the complete button in the finish wizard step.

getFinishDestinationUrl() публичный Метод

public getFinishDestinationUrl ( ) : string
Результат string the URL that the browser will be redirected to if the wizard finishes. Defaults to ''.

getFinishNavigation() публичный Метод

public getFinishNavigation ( ) : TWizardNavigationContainer
Результат TWizardNavigationContainer container of the finish navigation

getFinishNavigationTemplate() публичный Метод

public getFinishNavigationTemplate ( ) : ITemplate
Результат ITemplate navigation template for the finish step. Defaults to null.

getFinishPreviousButtonStyle() публичный Метод

public getFinishPreviousButtonStyle ( ) : TWizardNavigationButtonStyle
Результат TWizardNavigationButtonStyle the style for the previous button in the start wizard step.

getHeader() публичный Метод

public getHeader ( ) : TPanel
Результат TPanel container of the wizard header

getHeaderStyle() публичный Метод

public getHeaderStyle ( ) : TPanelStyle
Результат TPanelStyle the style for the header.

getHeaderTemplate() публичный Метод

public getHeaderTemplate ( ) : ITemplate
Результат ITemplate template for wizard header. Defaults to null.

getHeaderText() публичный Метод

public getHeaderText ( ) : string
Результат string header text. Defaults to ''.

getHistory() защищенный Метод

protected getHistory ( ) : TStack
Результат Prado\Collections\TStack history containing step indexes that were navigated before

getMultiView() публичный Метод

This method should only be used by control developers.
public getMultiView ( ) : TMultiView
Результат TMultiView the multiview holding wizard steps

getNavigationButtonStyle() публичный Метод

public getNavigationButtonStyle ( ) : TStyle
Результат TStyle the style common for all navigation buttons.

getNavigationStyle() публичный Метод

public getNavigationStyle ( ) : TPanelStyle
Результат TPanelStyle the style for the navigation panel.

getPreviousStepIndex() защищенный Метод

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

getShowCancelButton() публичный Метод

public getShowCancelButton ( ) : boolean
Результат boolean whether to display a cancel button in each wizard step. Defaults to false.

getShowSideBar() публичный Метод

public getShowSideBar ( ) : boolean
Результат boolean whether to display a side bar that contains links to wizard steps. Defaults to true.

getSideBar() публичный Метод

public getSideBar ( ) : TPanel
Результат TPanel container of the wizard side bar

getSideBarButtonStyle() публичный Метод

public getSideBarButtonStyle ( ) : TStyle
Результат TStyle the style for the buttons displayed in the side bar.

getSideBarStyle() публичный Метод

public getSideBarStyle ( ) : TPanelStyle
Результат TPanelStyle the style for the side bar.

getSideBarTemplate() публичный Метод

public getSideBarTemplate ( ) : ITemplate
Результат ITemplate template for the side bar. Defaults to null.

getStartNavigation() публичный Метод

public getStartNavigation ( ) : TWizardNavigationContainer
Результат TWizardNavigationContainer container of the start navigation

getStartNavigationTemplate() публичный Метод

public getStartNavigationTemplate ( ) : ITemplate
Результат ITemplate navigation template for the start step. Defaults to null.

getStartNextButtonStyle() публичный Метод

public getStartNextButtonStyle ( ) : TWizardNavigationButtonStyle
Результат TWizardNavigationButtonStyle the style for the next button in the start wizard step.

getStepContent() публичный Метод

public getStepContent ( ) : TPanel
Результат TPanel container of the wizard step content

getStepNavigation() публичный Метод

public getStepNavigation ( ) : TWizardNavigationContainer
Результат TWizardNavigationContainer container of the step navigation

getStepNavigationTemplate() публичный Метод

public getStepNavigationTemplate ( ) : ITemplate
Результат ITemplate navigation template for internal steps. Defaults to null.

getStepNextButtonStyle() публичный Метод

public getStepNextButtonStyle ( ) : TWizardNavigationButtonStyle
Результат TWizardNavigationButtonStyle the style for the next button in each internal wizard step.

getStepPreviousButtonStyle() публичный Метод

public getStepPreviousButtonStyle ( ) : TWizardNavigationButtonStyle
Результат TWizardNavigationButtonStyle the style for the previous button in the start wizard step.

getStepStyle() публичный Метод

public getStepStyle ( ) : TPanelStyle
Результат TPanelStyle the style for each internal wizard step.

getStepType() защищенный Метод

Determines the type of the specified wizard step.
protected getStepType ( $wizardStep ) : TWizardStepType
Результат TWizardStepType type of the step

getTagName() защищенный Метод

protected getTagName ( ) : string
Результат string tag name for the wizard

getUseDefaultLayout() публичный Метод

public getUseDefaultLayout ( ) : boolean
Результат boolean whether to use default layout to arrange side bar and the rest wizard components. Defaults to true.

getWizardSteps() публичный Метод

public getWizardSteps ( ) : TWizardStepCollection
Результат TWizardStepCollection collection of wizard steps

onActiveStepChanged() публичный Метод

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

onCancelButtonClick() публичный Метод

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

onCompleteButtonClick() публичный Метод

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

onInit() публичный Метод

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

onNextButtonClick() публичный Метод

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

onPreviousButtonClick() публичный Метод

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

onSideBarButtonClick() публичный Метод

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

removedWizardStep() публичный Метод

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() публичный Метод

Renders the wizard.
public render ( $writer )

requiresControlsRecreation() защищенный Метод

Indicates the wizard needs to recreate all child controls.

reset() защищенный Метод

Clears up everything within the wizard.
protected reset ( )

saveState() публичный Метод

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

setActiveStep() публичный Метод

public setActiveStep ( $step )

setActiveStepIndex() публичный Метод

public setActiveStepIndex ( $value )

setCancelDestinationUrl() публичный Метод

public setCancelDestinationUrl ( $value )

setFinishDestinationUrl() публичный Метод

public setFinishDestinationUrl ( $value )

setFinishNavigationTemplate() публичный Метод

public setFinishNavigationTemplate ( $value )

setHeaderTemplate() публичный Метод

public setHeaderTemplate ( $value )

setHeaderText() публичный Метод

public setHeaderText ( $value )

setShowCancelButton() публичный Метод

public setShowCancelButton ( $value )

setShowSideBar() публичный Метод

public setShowSideBar ( $value )

setSideBarTemplate() публичный Метод

public setSideBarTemplate ( $value )

setStartNavigationTemplate() публичный Метод

public setStartNavigationTemplate ( $value )

setStepNavigationTemplate() публичный Метод

public setStepNavigationTemplate ( $value )

setUseDefaultLayout() публичный Метод

public setUseDefaultLayout ( $value )

wizardStepsChanged() публичный Метод

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