PHP Class Prado\Web\UI\ActiveControls\TActiveCheckBox

The active control counter part to checkbox. The {@link setAutoPostBack AutoPostBack} property is set to true by default. Thus, when the checkbox is clicked a {@link onCallback OnCallback} event is raise after {@link OnCheckedChanged} event. The {@link setText Text} and {@link setChecked Checked} properties can be changed during a callback.
Since: 3.1
Inheritance: extends Prado\Web\UI\WebControls\TCheckBox, implements Prado\Web\UI\ActiveControls\ICallbackEventHandler, implements Prado\Web\UI\ActiveControls\IActiveControl
Afficher le fichier Open project: pradosoft/prado Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( ) Creates a new callback control, sets the adapter to TActiveControlAdapter. If you override this class, be sure to set the adapter appropriately by, for example, by calling this constructor.
getActiveControl ( ) : TBaseActiveCallbackControl
getClientSide ( ) : TCallbackClientSide
getLabelAttributes ( ) : TMap Overrides parent implementation to ensure label has ID.
onCallback ( $param ) This method is invoked when a callback is requested. The method raises 'OnCallback' event to fire up the event handlers. If you override this method, be sure to call the parent implementation so that the event handler can be invoked.
raiseCallbackEvent ( $param ) Raises the callback event. This method is required by {@link ICallbackEventHandler} interface.
setChecked ( $value ) Sets a value indicating whether the checkbox is to be checked or not.
setText ( $value ) Updates the button text on the client-side if the {@link setEnableUpdate EnableUpdate} property is set to true.

Méthodes protégées

Méthode Description
getClientClassName ( ) : string
getDefaultLabelID ( ) : string
renderClientControlScript ( $writer ) Override parent implementation, no javascript is rendered here instead the javascript required for active control is registered in {@link addAttributesToRender}.
renderInputTag ( $writer, $clientID, $onclick ) Ensure that the ID attribute is rendered and registers the javascript code for initializing the active control.
renderLabel ( $writer, $clientID, $text ) Renders a label beside the checkbox.

Method Details

__construct() public méthode

Creates a new callback control, sets the adapter to TActiveControlAdapter. If you override this class, be sure to set the adapter appropriately by, for example, by calling this constructor.
public __construct ( )

getActiveControl() public méthode

public getActiveControl ( ) : TBaseActiveCallbackControl
Résultat TBaseActiveCallbackControl standard callback control options.

getClientClassName() protected méthode

protected getClientClassName ( ) : string
Résultat string corresponding javascript class name for this TActiveCheckBox.

getClientSide() public méthode

public getClientSide ( ) : TCallbackClientSide
Résultat TCallbackClientSide client side request options.

getDefaultLabelID() protected méthode

protected getDefaultLabelID ( ) : string
Résultat string checkbox label ID;

getLabelAttributes() public méthode

Overrides parent implementation to ensure label has ID.
public getLabelAttributes ( ) : TMap
Résultat TMap list of attributes to be rendered for label beside the checkbox

onCallback() public méthode

This method is invoked when a callback is requested. The method raises 'OnCallback' event to fire up the event handlers. If you override this method, be sure to call the parent implementation so that the event handler can be invoked.
public onCallback ( $param )

raiseCallbackEvent() public méthode

This method is mainly used by framework and control developers.
public raiseCallbackEvent ( $param )

renderClientControlScript() protected méthode

Override parent implementation, no javascript is rendered here instead the javascript required for active control is registered in {@link addAttributesToRender}.
protected renderClientControlScript ( $writer )

renderInputTag() protected méthode

Since 3.1.4, the javascript code is not rendered if {@link setAutoPostBack AutoPostBack} is false
protected renderInputTag ( $writer, $clientID, $onclick )

renderLabel() protected méthode

Renders a label beside the checkbox.
protected renderLabel ( $writer, $clientID, $text )

setChecked() public méthode

Updates checkbox checked state on the client-side if the {@link setEnableUpdate EnableUpdate} property is set to true.
public setChecked ( $value )

setText() public méthode

Updates the button text on the client-side if the {@link setEnableUpdate EnableUpdate} property is set to true.
public setText ( $value )