MediaWiki  REL1_21
HTMLCheckMatrix Class Reference

A checkbox matrix Operates similarly to HTMLMultiSelectField, but instead of using an array of options, uses an array of rows and an array of columns to dynamically construct a matrix of options. More...

Inheritance diagram for HTMLCheckMatrix:
Collaboration diagram for HTMLCheckMatrix:

List of all members.

Public Member Functions

 getDefault ()
 getInputHTML ($value)
 Build a table containing a matrix of checkbox options.
 getTableRow ($value)
 Get the complete table row for the input, including help text, labels, and whatever.
 loadDataFromRequest ($request)
 validate ($value, $alldata)
 Override this function to add specific validation checks on the field input.

Detailed Description

A checkbox matrix Operates similarly to HTMLMultiSelectField, but instead of using an array of options, uses an array of rows and an array of columns to dynamically construct a matrix of options.

Definition at line 1786 of file HTMLForm.php.


Member Function Documentation

Reimplemented from HTMLFormField.

Definition at line 1935 of file HTMLForm.php.

Referenced by loadDataFromRequest().

Build a table containing a matrix of checkbox options.

The value of each option is a combination of the row tag and column tag. mParams['rows'] is an array with row labels as keys and row tags as values. mParams['columns'] is an array with column labels as keys and column tags as values.

Parameters:
array$valueof the options that should be checked
Returns:
String

Reimplemented from HTMLFormField.

Definition at line 1827 of file HTMLForm.php.

Get the complete table row for the input, including help text, labels, and whatever.

We override this function since the label should always be on a separate line above the options in the case of a checkbox matrix, i.e. it's always a "vertical-label".

Parameters:
string$valuethe value to set the input to
Returns:
String complete HTML table row

Reimplemented from HTMLFormField.

Definition at line 1887 of file HTMLForm.php.

Parameters:
$requestWebRequest
Returns:
Array

Reimplemented from HTMLFormField.

Definition at line 1915 of file HTMLForm.php.

References array(), and getDefault().

HTMLCheckMatrix::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.

Definition at line 1788 of file HTMLForm.php.


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