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.
Show file
Open project: pradosoft/prado
Public Methods
Method |
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 method
Constructor. Set the parent control owning these options.
Gets an option named value. Options are used to store and retrive
named values for the base active controls.
public __get ( $name ) : mixed |
return |
mixed |
options value or null if not set. |
Sets a named options with a value. Options are used to store and retrive
named values for the javascript control.
public __set ( $name, $value ) |
Only serialize the options itself, not the corresponding parent control.
public __sleep ( ) : mixed |
return |
mixed |
array with the names of all variables of that object that should be serialized. |
raiseCallbackEvent()
public method
Raise the specific callback event handler of the target control.
setControl()
public method
public setControl ( TControl $control ) |
$control |
Prado\Web\UI\TControl |
|
public toArray ( ) : Array |
return |
Array |
of active control options |