PHP Класс Prado\Web\UI\WebControls\TMultiView

TMultiView serves as a container for a group of {@link TView} controls. The view collection can be retrieved by {@link getViews Views}. Each view contains child controls. TMultiView determines which view and its child controls are visible. At any time, at most one view is visible (called active). To make a view active, set {@link setActiveView ActiveView} or {@link setActiveViewIndex ActiveViewIndex}. TMultiView also responds to specific command events raised from button controls contained in current active view. A command event with name 'NextView' will cause TMultiView to make the next available view active. Other command names recognized by TMultiView include - PreviousView : switch to previous view - SwitchViewID : switch to a view by its ID path - SwitchViewIndex : switch to a view by its index in the {@link getViews Views} collection. TMultiView raises {@link OnActiveViewChanged OnActiveViewChanged} event when its active view is changed during a postback.
С версии: 3.0
Автор: Qiang Xue ([email protected])
Наследование: extends Prado\Web\UI\TControl
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
addParsedObject ( $object ) Processes an object that is created during parsing template.
bubbleEvent ( $sender, $param ) : boolean Processes the events bubbled from child controls.
getActiveView ( ) : TView
getActiveViewIndex ( ) : integer
getViews ( ) : TViewCollection
ignoreBubbleEvents ( ) Makes the multiview ignore all bubbled events.
loadState ( ) Loads state into the wizard.
onActiveViewChanged ( $param ) Raises OnActiveViewChanged event.
onInit ( $param ) Initializes the active view if any.
render ( $writer ) Renders the currently active view.
setActiveView ( $view )
setActiveViewIndex ( $value )

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

Метод Описание
activateView ( $view, $triggerViewChangedEvent = true ) Activates the specified view.
createControlCollection ( ) : TViewCollection Creates a control collection object that is to be used to hold child controls

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

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

If there is any view currently active, it will be deactivated.
protected activateView ( $view, $triggerViewChangedEvent = true )

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

This method overrides the parent implementation by adding only {@link TView} controls as children.
См. также: createdOnTemplate
public addParsedObject ( $object )

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

The method handles view-related command events.
public bubbleEvent ( $sender, $param ) : boolean
Результат boolean whether this event is handled

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

Creates a control collection object that is to be used to hold child controls
protected createControlCollection ( ) : TViewCollection
Результат TViewCollection control collection

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

public getActiveView ( ) : TView
Результат TView the currently active view, null if no active view

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

public getActiveViewIndex ( ) : integer
Результат integer the zero-based index of the current view in the view collection. -1 if no active view. Default is -1.

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

public getViews ( ) : TViewCollection
Результат TViewCollection the view collection

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

This is method is used internally by framework and control developers.
public ignoreBubbleEvents ( )

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

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

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

The event is raised when the currently active view is changed to a new one
public onActiveViewChanged ( $param )

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

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

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

Renders the currently active view.
public render ( $writer )

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

public setActiveView ( $view )

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

public setActiveViewIndex ( $value )