MediaWiki  REL1_24
HTMLRadioField Class Reference

Radio checkbox fields. More...

Inheritance diagram for HTMLRadioField:
Collaboration diagram for HTMLRadioField:

List of all members.

Public Member Functions

 formatOptions ($options, $value)
 getInputHTML ($value)
 This returns a block of all the radio options, in one cell.
 validate ($value, $alldata)
 Override this function to add specific validation checks on the field input.

Protected Member Functions

 needsLabel ()
 Should this field have a label, or is there no input element with the appropriate id for the label to point to?

Detailed Description

Radio checkbox fields.

Definition at line 6 of file HTMLRadioField.php.


Member Function Documentation

This returns a block of all the radio options, in one cell.

See also:
includes/HTMLFormFieldgetInputHTML()
Parameters:
string$value
Returns:
string

Reimplemented from HTMLFormField.

Definition at line 35 of file HTMLRadioField.php.

References $html, $value, formatOptions(), and HTMLFormField\getOptions().

HTMLRadioField::needsLabel ( ) [protected]

Should this field have a label, or is there no input element with the appropriate id for the label to point to?

Returns:
bool True to output a label, false to suppress

Reimplemented from HTMLFormField.

Definition at line 68 of file HTMLRadioField.php.

HTMLRadioField::validate ( value,
alldata 
)

Override this function to add specific validation checks on the field input.

Don't forget to call parent::validate() to ensure that the user-defined callback mValidationCallback is still run

Parameters:
string | array$valueThe value the field was submitted with
array$alldataThe data collected from the form
Returns:
bool|string True on success, or String error to display, or false to fail validation without displaying an error.

Reimplemented from HTMLFormField.

Definition at line 7 of file HTMLRadioField.php.

References $value, HTMLFormField\flattenOptions(), HTMLFormField\getOptions(), and HTMLFormField\msg().


The documentation for this class was generated from the following file: