Go to the documentation of this file.
34 $missing = array_diff( self::$requiredParams, array_keys(
$params ) );
42 $rows = $this->mParams[
'rows'];
43 $columns = $this->mParams[
'columns'];
46 $p = parent::validate(
$value, $alldata );
52 if ( !is_array(
$value ) ) {
58 $validOptions =
array();
59 foreach ( $rows
as $rowTag ) {
61 $validOptions[] = $columnTag .
'-' . $rowTag;
64 $validValues = array_intersect(
$value, $validOptions );
65 if ( count( $validValues ) == count(
$value ) ) {
68 return $this->
msg(
'htmlform-select-badoption' )->parse();
85 $rows = $this->mParams[
'rows'];
86 $columns = $this->mParams[
'columns'];
92 foreach (
$columns as $columnLabel => $columnTag ) {
97 $tooltipClass =
'mw-icon-question';
98 if ( isset( $this->mParams[
'tooltip-class'] ) ) {
99 $tooltipClass = $this->mParams[
'tooltip-class'];
103 foreach ( $rows
as $rowLabel => $rowTag ) {
105 if ( isset( $this->mParams[
'tooltips'][$rowLabel] ) ) {
106 $tooltipAttribs =
array(
107 'class' =>
"mw-htmlform-tooltip $tooltipClass",
108 'title' => $this->mParams[
'tooltips'][$rowLabel],
110 $rowLabel .=
' ' .
Html::element(
'span', $tooltipAttribs,
'' );
114 $thisTag =
"$columnTag-$rowTag";
116 $thisAttribs =
array(
117 'id' =>
"{$this->mID}-$thisTag",
120 $checked = in_array( $thisTag, (
array)
$value,
true );
123 $thisAttribs[
'disabled'] = 1;
126 $thisAttribs[
'disabled'] = 1;
139 array(
'class' =>
'mw-htmlform-matrix' ),
146 return isset( $this->mParams[
'force-options-off'] )
147 && in_array( $tag, $this->mParams[
'force-options-off'] );
151 return isset( $this->mParams[
'force-options-on'] )
152 && in_array( $tag, $this->mParams[
'force-options-on'] );
169 $fieldType = get_class( $this );
171 $cellAttributes =
array(
'colspan' => 2 );
177 array(
'class' =>
'mw-input' ) + $cellAttributes,
178 $inputHtml .
"\n$errors"
183 array(
'class' =>
"mw-htmlform-field-$fieldType {$this->mClass} $errorClass" ),
186 return $html . $helptext;
195 if ( $this->mParent->getMethod() ==
'post' ) {
215 if ( isset( $this->mDefault ) ) {
227 foreach ( $rows
as $row ) {
229 $thisTag =
"$column-$row";
231 $res[$thisTag] =
false;
233 $res[$thisTag] =
true;
235 $res[$thisTag] = in_array( $thisTag, $data );
do that in ParserLimitReportFormat instead use this to modify the parameters of the image and a DIV can begin in one section and end in another Make sure your code can handle that case gracefully See the EditSectionClearerLink extension for an example zero but section is usually empty its values are the globals values my talk my contributions etc etc otherwise the built in rate limiting checks are if enabled also a ContextSource error or success you ll probably need to make sure the header is varied on WebRequest $request
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses & $html
static element( $element, $attribs=array(), $contents='')
Identical to rawElement(), but HTML-escapes $contents (like Xml::element()).
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
validate( $value, $alldata)
Override this function to add specific validation checks on the field input.
getTableRow( $value)
Get the complete table row for the input, including help text, labels, and whatever.
deferred txt A few of the database updates required by various functions here can be deferred until after the result page is displayed to the user For updating the view updating the linked to tables after a etc PHP does not yet have any way to tell the server to actually return and disconnect while still running these but it might have such a feature in the future We handle these by creating a deferred update object and putting those objects on a global list
filterDataForSubmit( $data)
Support for seperating multi-option preferences into multiple preferences Due to lack of array suppor...
static check( $name, $checked=false, $attribs=array())
Convenience function to build an HTML checkbox.
loadDataFromRequest( $request)
getInputHTML( $value)
Build a table containing a matrix of checkbox options.
A checkbox matrix Operates similarly to HTMLMultiSelectField, but instead of using an array of option...
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
__construct( $params)
Initialise the object.
static rawElement( $element, $attribs=array(), $contents='')
Returns an HTML element in a string.
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing & $attribs