PHP Class Prado\Web\UI\ActiveControls\TActivePageAdapter

Callback request handler.
Since: 3.1
Inheritance: extends Prado\Web\UI\TControlAdapter
Datei anzeigen Open project: pradosoft/prado

Public Methods

Method Description
__construct ( TPage $control ) Constructor, trap errors and exception to let the callback response handle them.
getCallbackClientHandler ( ) : TCallbackClientScript Gets the callback client script handler. It handlers the javascript functions to be executed during the callback response.
getCallbackEventParameter ( ) : string Gets callback parameter.
getCallbackEventTarget ( ) : TControl
processCallbackEvent ( $writer ) Process the callback request.
registerControlToRender ( $control, $writer ) Register a control for defered render() call.
renderCallbackResponse ( $writer ) Render the callback response.
setCallbackEventParameter ( $value )
setCallbackEventTarget ( TControl $control ) Registers a control to raise callback event in the current request.

Protected Methods

Method Description
redirect ( $url ) Redirect url on the client-side using javascript.
renderResponse ( $writer ) Renders the callback response by adding additional callback data and javascript actions in the header and page state if required.
trapCallbackErrorsExceptions ( ) Trap errors and exceptions to be handled by TCallbackErrorHandler.

Private Methods

Method Description
appendContentPart ( $response, $delimiter, $data ) Appends data or javascript code to the body content surrounded with delimiters
raiseCallbackEvent ( ) Trys to find the callback event handler and raise its callback event.

Method Details

__construct() public method

Constructor, trap errors and exception to let the callback response handle them.
public __construct ( TPage $control )
$control Prado\Web\UI\TPage

getCallbackClientHandler() public method

Gets the callback client script handler. It handlers the javascript functions to be executed during the callback response.
public getCallbackClientHandler ( ) : TCallbackClientScript
return TCallbackClientScript callback client handler.

getCallbackEventParameter() public method

Gets callback parameter.
public getCallbackEventParameter ( ) : string
return string postback event parameter

getCallbackEventTarget() public method

public getCallbackEventTarget ( ) : TControl
return Prado\Web\UI\TControl the control responsible for the current callback event, null if nonexistent

processCallbackEvent() public method

Process the callback request.
public processCallbackEvent ( $writer )

redirect() protected method

Redirect url on the client-side using javascript.
protected redirect ( $url )

registerControlToRender() public method

Register a control for defered render() call.
public registerControlToRender ( $control, $writer )

renderCallbackResponse() public method

Render the callback response.
public renderCallbackResponse ( $writer )

renderResponse() protected method

Renders the callback response by adding additional callback data and javascript actions in the header and page state if required.
protected renderResponse ( $writer )

setCallbackEventParameter() public method

public setCallbackEventParameter ( $value )

setCallbackEventTarget() public method

Registers a control to raise callback event in the current request.
public setCallbackEventTarget ( TControl $control )
$control Prado\Web\UI\TControl

trapCallbackErrorsExceptions() protected method

Trap errors and exceptions to be handled by TCallbackErrorHandler.