An option is not used as a control on its own. Instead it is used by a control that offers choices (e.g. checkbox). The FC_EVENT_SELECT and FC_EVENT_DESELECT events are supported to enable the option to be selected and deselected.
Options also have labels to describe themselves.
Definition at line 1177 of file controls.php.
Public Member Functions | |
Option ($value, $label=null, $control_name=null) | |
The Option constructor. | |
getValue () | |
Get the control's value. | |
setValue ($value) | |
Set the control's value. | |
getControlName () | |
Get the control's name. | |
setControlName ($name) | |
Set the control's name. | |
getLabel () | |
Get the option's label. | |
setLabel ($label) | |
Set the option's label. | |
selected () | |
Check whether the the option has been selected. | |
select () | |
Flag the option as being selected. | |
deselect () | |
Flag the option as not being selected. | |
__sleep () | |
Prepare object for serialisation. | |
Public Attributes | |
$control_name | |
The option's name. |
|
The Option constructor.
Definition at line 1188 of file controls.php. References FC_EVENT_DESELECT, and FC_EVENT_SELECT. |
|
Prepare object for serialisation. This method is automatically called just before the object is serialised to carry out clean-up operations. See the PHP documentation at http://www.php.net/manual/en/language.oop.magic-functions.php for more information.
Reimplemented from ControlElement. Definition at line 1289 of file controls.php. |
|
Flag the option as not being selected.
Definition at line 1278 of file controls.php. References FC_EVENT_DESELECT, and FC_EVENT_SELECT. |
|
Get the control's name.
Reimplemented from ControlElement. Definition at line 1216 of file controls.php. |
|
Get the option's label.
Definition at line 1235 of file controls.php. |
|
Get the control's value. An interface for retrieving a control's value. This should be overridden in a subclass to return a value.
Reimplemented from ControlElement. Definition at line 1202 of file controls.php. |
|
Flag the option as being selected.
Definition at line 1267 of file controls.php. References FC_EVENT_DESELECT, and FC_EVENT_SELECT. |
|
Check whether the the option has been selected.
Definition at line 1258 of file controls.php. |
|
Set the control's name.
Reimplemented from ControlElement. Definition at line 1221 of file controls.php. |
|
Set the option's label.
Definition at line 1245 of file controls.php. |
|
Set the control's value. This sets the control's value and flags the control has having been updated.
Reimplemented from ControlElement. Definition at line 1207 of file controls.php. |
|
The option's name.
Definition at line 1180 of file controls.php. |