MediaWiki  REL1_21
HTMLMultiSelectField Class Reference

Multi-select field. More...

Inheritance diagram for HTMLMultiSelectField:
Collaboration diagram for HTMLMultiSelectField:

List of all members.

Public Member Functions

 formatOptions ($options, $value)
 getDefault ()
 getInputHTML ($value)
 This function must be implemented to return the HTML to generate the input object itself.
 loadDataFromRequest ($request)
 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

Multi-select field.

Definition at line 2083 of file HTMLForm.php.


Member Function Documentation

HTMLMultiSelectField::formatOptions ( options,
value 
)

Definition at line 2114 of file HTMLForm.php.

Reimplemented from HTMLFormField.

Definition at line 2168 of file HTMLForm.php.

Referenced by loadDataFromRequest().

This function must be implemented to return the HTML to generate the input object itself.

It should not implement the surrounding table cells/rows, or labels/help messages.

Parameters:
string$valuethe value to set the input to; eg a default text for a text input.
Returns:
String valid HTML.

Reimplemented from HTMLFormField.

Definition at line 2108 of file HTMLForm.php.

Parameters:
$requestWebRequest
Returns:
String

Reimplemented from HTMLFormField.

Definition at line 2147 of file HTMLForm.php.

References array(), and getDefault().

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 2176 of file HTMLForm.php.

HTMLMultiSelectField::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$valuethe value the field was submitted with
array$alldatathe data collected from the form
Returns:
Mixed Bool true on success, or String error to display.

Reimplemented from HTMLFormField.

Reimplemented in EditWatchlistCheckboxSeriesField.

Definition at line 2085 of file HTMLForm.php.


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