MediaWiki
REL1_22
|
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...
Public Member Functions | |
__construct ($params) | |
Initialise the object. | |
filterDataForSubmit ($data) | |
Support for seperating multi-option preferences into multiple preferences Due to lack of array support. | |
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. | |
Protected Member Functions | |
isTagForcedOff ($tag) | |
isTagForcedOn ($tag) | |
Static Private Attributes | |
static | $requiredParams |
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.
The tags used to identify a particular cell are of the form "columnName-rowName"
Options:
Definition at line 2024 of file HTMLForm.php.
HTMLCheckMatrix::__construct | ( | $ | params | ) |
Initialise the object.
array | $params | Associative Array. See HTMLForm doc for syntax. |
MWException |
Reimplemented from HTMLFormField.
Definition at line 2033 of file HTMLForm.php.
HTMLCheckMatrix::filterDataForSubmit | ( | $ | data | ) |
Support for seperating multi-option preferences into multiple preferences Due to lack of array support.
$data | array |
Implements HTMLNestedFilterable.
Definition at line 2221 of file HTMLForm.php.
Reimplemented from HTMLFormField.
Definition at line 2213 of file HTMLForm.php.
HTMLCheckMatrix::getInputHTML | ( | $ | value | ) |
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.
array | $value | of the options that should be checked |
Reimplemented from HTMLFormField.
Definition at line 2080 of file HTMLForm.php.
HTMLCheckMatrix::getTableRow | ( | $ | value | ) |
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".
string | $value | the value to set the input to |
Reimplemented from HTMLFormField.
Definition at line 2165 of file HTMLForm.php.
HTMLCheckMatrix::isTagForcedOff | ( | $ | tag | ) | [protected] |
Definition at line 2146 of file HTMLForm.php.
HTMLCheckMatrix::isTagForcedOn | ( | $ | tag | ) | [protected] |
Definition at line 2151 of file HTMLForm.php.
HTMLCheckMatrix::loadDataFromRequest | ( | $ | request | ) |
$request | WebRequest |
Reimplemented from HTMLFormField.
Definition at line 2193 of file HTMLForm.php.
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
string | $value | the value the field was submitted with |
array | $alldata | the data collected from the form |
Reimplemented from HTMLFormField.
Definition at line 2041 of file HTMLForm.php.
HTMLCheckMatrix::$requiredParams [static, private] |
array( 'fieldname', 'rows', 'columns' )
Definition at line 2026 of file HTMLForm.php.