PHP Class Prado\Web\UI\ActiveControls\TActiveControlAdapter

Customize the parent TControl class for active control classes. TActiveControlAdapter instantiates a common base active control class throught the {@link getBaseActiveControl BaseActiveControl} property. The type of BaseActiveControl can be provided in the second parameter in the constructor. Default is TBaseActiveControl or TBaseActiveCallbackControl if the control adapted implements ICallbackEventHandler. TActiveControlAdapter will tracking viewstate changes to update the corresponding client-side properties.
Since: 3.1
Inheritance: extends Prado\Web\UI\TControlAdapter
Mostrar archivo Open project: pradosoft/prado Class Usage Examples

Public Methods

Method Description
__construct ( Prado\Web\UI\ActiveControls\IActiveControl $control, $baseCallbackClass = null ) Constructor.
getBaseActiveControl ( ) : TBaseActiveControl
getStateTracker ( ) : TCallbackPageStateTracker
onLoad ( $param ) Starts viewstate tracking if necessary after when controls has been loaded
onPreRender ( $param ) Publish the ajax script
render ( $writer ) Renders the callback client scripts.
saveState ( ) Saves additional persistent control state. Respond to viewstate changes if necessary.
setBaseActiveControl ( $control )
setStateTracker ( $value )

Protected Methods

Method Description
getIsTrackingPageState ( ) : boolean
setBaseControlClass ( $type )

Method Details

__construct() public method

Constructor.
public __construct ( Prado\Web\UI\ActiveControls\IActiveControl $control, $baseCallbackClass = null )
$control Prado\Web\UI\ActiveControls\IActiveControl

getBaseActiveControl() public method

public getBaseActiveControl ( ) : TBaseActiveControl
return TBaseActiveControl Common active control options.

getIsTrackingPageState() protected method

protected getIsTrackingPageState ( ) : boolean
return boolean true if the viewstate needs to be tracked.

getStateTracker() public method

public getStateTracker ( ) : TCallbackPageStateTracker
return TCallbackPageStateTracker state tracker.

onLoad() public method

Starts viewstate tracking if necessary after when controls has been loaded
public onLoad ( $param )

onPreRender() public method

Publish the ajax script
public onPreRender ( $param )

render() public method

Renders the callback client scripts.
public render ( $writer )

saveState() public method

Saves additional persistent control state. Respond to viewstate changes if necessary.
public saveState ( )

setBaseActiveControl() public method

public setBaseActiveControl ( $control )

setBaseControlClass() protected method

protected setBaseControlClass ( $type )

setStateTracker() public method

public setStateTracker ( $value )