PHP Class Prado\Web\UI\JuiControls\TJuiControlOptions

TJuiControlOptions is an helper class that can collect a list of options for a control. The control must implement {@link IJuiOptions}. The options are validated againg an array of valid options provided by the control itself. Since component properties are case insensitive, the array of valid options is used to ensure the option name has the correct case. The options array can then get retrieved using {@link toArray} and applied to the jQuery-ui widget. In addition to the options, this class will render the needed javascript to raise a callback for any event for which an handler is defined in the control.
Since: 3.3
Author: Fabio Bas ([email protected])
Afficher le fichier Open project: pradosoft/prado

Méthodes publiques

Méthode Description
__construct ( $control ) Constructor. Set the parent control owning these options.
__get ( $name ) : mixed Gets an option named value. Options are used to store and retrive named values for the base active controls.
__set ( $name, $value ) Sets a named options with a value. Options are used to store and retrive named values for the javascript control.
__sleep ( ) : mixed Only serialize the options itself, not the corresponding parent control.
raiseCallbackEvent ( $param ) Raise the specific callback event handler of the target control.
setControl ( TControl $control ) Sets the parent control.
toArray ( ) : Array

Method Details

__construct() public méthode

Constructor. Set the parent control owning these options.
public __construct ( $control )

__get() public méthode

Gets an option named value. Options are used to store and retrive named values for the base active controls.
public __get ( $name ) : mixed
Résultat mixed options value or null if not set.

__set() public méthode

Sets a named options with a value. Options are used to store and retrive named values for the javascript control.
public __set ( $name, $value )

__sleep() public méthode

Only serialize the options itself, not the corresponding parent control.
public __sleep ( ) : mixed
Résultat mixed array with the names of all variables of that object that should be serialized.

raiseCallbackEvent() public méthode

Raise the specific callback event handler of the target control.
public raiseCallbackEvent ( $param )

setControl() public méthode

Sets the parent control.
public setControl ( TControl $control )
$control Prado\Web\UI\TControl

toArray() public méthode

public toArray ( ) : Array
Résultat Array of active control options