Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

CheckedInput Class Reference

Inheritance diagram for CheckedInput:

Inheritance graph
List of all members.

Detailed Description

An input representing a control that can be 'checked'.

An input that can be checked is either a radio button or checkbox. As such, it is possible that an instance of this class would an option in a choice of related options. As such it must implement the selectable interface of the MultipleOption class.

Definition at line 1389 of file controls.php.

Public Member Functions

 CheckedInput ($type, $label=null, $control_name=null)
 The CheckedInput constructor.

 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.

 toString ()
 Get a human readable string representation of the element.

 __sleep ()
 Prepare object for serialisation.


Public Attributes

 $label
 The label of the option.


Constructor & Destructor Documentation

CheckedInput::CheckedInput type,
label = null,
control_name = null
 

The CheckedInput constructor.

Parameters:
$type the value of the input element's type attribute
$control_name the unique name for the control (also as appears in the HTTPD POST string)
Parameters:
$label the label of the option

Definition at line 1399 of file controls.php.

References FC_EVENT_DESELECT, and FC_EVENT_SELECT.


Member Function Documentation

CheckedInput::__sleep  ) 
 

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.

Returns:
an array of object property names to be serialised.

Reimplemented from ControlElement.

Definition at line 1478 of file controls.php.

CheckedInput::deselect  ) 
 

Flag the option as not being selected.

Returns:
void

Definition at line 1454 of file controls.php.

References FC_EVENT_DESELECT, and FC_EVENT_SELECT.

CheckedInput::getLabel  ) 
 

Get the option's label.

Returns:
the label or null if one has not been set

Definition at line 1416 of file controls.php.

CheckedInput::select  ) 
 

Flag the option as being selected.

Returns:
void

Definition at line 1443 of file controls.php.

References FC_EVENT_DESELECT, and FC_EVENT_SELECT.

CheckedInput::selected  ) 
 

Check whether the the option has been selected.

Returns:
true if the option is selected, false otherwise

Definition at line 1434 of file controls.php.

CheckedInput::setLabel label  ) 
 

Set the option's label.

Parameters:
$label the label string
Returns:
true if the label was successfully set, false otherwise

Definition at line 1425 of file controls.php.

References $label.

CheckedInput::toString  ) 
 

Get a human readable string representation of the element.

Returns:
string

Reimplemented from XHTMLElement.

Reimplemented in CheckboxInput.

Definition at line 1465 of file controls.php.

References $label.


Member Data Documentation

CheckedInput::$label
 

The label of the option.

Definition at line 1392 of file controls.php.

Referenced by setLabel(), and toString().


The documentation for this class was generated from the following file:
Generated on Mon Feb 14 11:39:50 2005 for FormControls by doxygen 1.3.5