HTMLMultiSelectField Class Reference

Multi-select field. More...

Inherits HTMLFormField.

List of all members.

Public Member Functions

 validate ($value, $alldata)
 Override this function to add specific validation checks on the field input.
 getInputHTML ($value)
 This function must be implemented to return the HTML to generate the input object itself.
 formatOptions ($options, $value)
 loadDataFromRequest ($request)
 Get the value that this input has been set to from a posted form, or the input's default value if it has not been set.
 getDefault ()

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


Member Function Documentation

HTMLMultiSelectField::formatOptions ( options,
value 
)

Definition at line 1214 of file HTMLForm.php.

References $options, Xml::check(), and Html::rawElement().

Referenced by getInputHTML().

HTMLMultiSelectField::getDefault (  ) 

Reimplemented from HTMLFormField.

Definition at line 1254 of file HTMLForm.php.

Referenced by loadDataFromRequest().

HTMLMultiSelectField::getInputHTML ( value  ) 

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:
$value String the value to set the input to; eg a default text for a text input.
Returns:
String valid HTML.

Reimplemented from HTMLFormField.

Definition at line 1208 of file HTMLForm.php.

References formatOptions().

HTMLMultiSelectField::loadDataFromRequest ( request  ) 

Get the value that this input has been set to from a posted form, or the input's default value if it has not been set.

Parameters:
$request WebRequest
Returns:
String the value

Reimplemented from HTMLFormField.

Definition at line 1240 of file HTMLForm.php.

References getDefault().

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

Reimplemented from HTMLFormField.

Definition at line 1191 of file HTMLForm.php.

References HTMLFormField::flattenOptions(), and wfMsgExt().


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

Generated on Sat Apr 30 22:57:39 2011 for MediaWiki by  doxygen 1.5.9