MediaWiki  REL1_24
HTMLMultiSelectField Class Reference

Multi-select field. More...

Inheritance diagram for HTMLMultiSelectField:
Collaboration diagram for HTMLMultiSelectField:

List of all members.

Public Member Functions

 filterDataForSubmit ($data)
 Support for seperating multi-option preferences into multiple preferences Due to lack of array support.
 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 6 of file HTMLMultiSelectField.php.


Member Function Documentation

Support for seperating multi-option preferences into multiple preferences Due to lack of array support.

Parameters:
array$data

Implements HTMLNestedFilterable.

Definition at line 107 of file HTMLMultiSelectField.php.

References $options, $res, array(), as, HTMLFormField\flattenOptions(), HTMLFormField\forceToStringRecursive(), and HTMLFormField\getOptions().

HTMLMultiSelectField::formatOptions ( options,
value 
)

Reimplemented from HTMLFormField.

Definition at line 99 of file HTMLMultiSelectField.php.

References array().

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 30 of file HTMLMultiSelectField.php.

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

Parameters:
WebRequest$request
Returns:
string

Reimplemented from HTMLFormField.

Definition at line 78 of file HTMLMultiSelectField.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 119 of file HTMLMultiSelectField.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 | 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.

Reimplemented in EditWatchlistCheckboxSeriesField.

Definition at line 7 of file HTMLMultiSelectField.php.

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


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