MediaWiki  master
Xml.php
Go to the documentation of this file.
1 <?php
24 
28 class Xml {
41  public static function element( $element, $attribs = null, $contents = '',
42  $allowShortTag = true
43  ) {
44  $out = '<' . $element;
45  if ( $attribs !== null ) {
46  $out .= self::expandAttributes( $attribs );
47  }
48  if ( $contents === null ) {
49  $out .= '>';
50  } elseif ( $allowShortTag && $contents === '' ) {
51  $out .= ' />';
52  } else {
53  $out .= '>' . htmlspecialchars( $contents, ENT_NOQUOTES ) . "</$element>";
54  }
55  return $out;
56  }
57 
67  public static function expandAttributes( $attribs ) {
68  $out = '';
69  if ( $attribs === null ) {
70  return null;
71  } elseif ( is_array( $attribs ) ) {
72  foreach ( $attribs as $name => $val ) {
73  $out .= " {$name}=\"" . Sanitizer::encodeAttribute( $val ) . '"';
74  }
75  return $out;
76  } else {
77  throw new MWException( 'Expected attribute array, got something else in ' . __METHOD__ );
78  }
79  }
80 
92  public static function elementClean( $element, $attribs = [], $contents = '' ) {
93  if ( $attribs ) {
94  $attribs = array_map( [ UtfNormal\Validator::class, 'cleanUp' ], $attribs );
95  }
96  if ( $contents ) {
97  $contents =
98  MediaWikiServices::getInstance()->getContentLanguage()->normalize( $contents );
99  }
100  return self::element( $element, $attribs, $contents );
101  }
102 
110  public static function openElement( $element, $attribs = null ) {
111  return '<' . $element . self::expandAttributes( $attribs ) . '>';
112  }
113 
119  public static function closeElement( $element ) {
120  return "</$element>";
121  }
122 
132  public static function tags( $element, $attribs, $contents ) {
133  return self::openElement( $element, $attribs ) . $contents . "</$element>";
134  }
135 
145  public static function monthSelector( $selected = '', $allmonths = null, $id = 'month' ) {
146  global $wgLang;
147  $options = [];
148 
149  if ( $selected === null ) {
150  $selected = '';
151  }
152  $data = new XmlSelect( 'month', $id, $selected );
153 
154  if ( $allmonths !== null ) {
155  $options[wfMessage( 'monthsall' )->text()] = $allmonths;
156  }
157  for ( $i = 1; $i < 13; $i++ ) {
158  $options[$wgLang->getMonthName( $i )] = $i;
159  }
160  $data->addOptions( $options );
161  $data->setAttribute( 'class', 'mw-month-selector' );
162  return $data->getHTML();
163  }
164 
171  public static function dateMenu( $year, $month ) {
172  # Offset overrides year/month selection
173  if ( $month && $month !== -1 ) {
174  $encMonth = intval( $month );
175  } else {
176  $encMonth = '';
177  }
178  if ( $year ) {
179  $encYear = intval( $year );
180  } elseif ( $encMonth ) {
181  $timestamp = MWTimestamp::getInstance();
182  $thisMonth = intval( $timestamp->format( 'n' ) );
183  $thisYear = intval( $timestamp->format( 'Y' ) );
184  if ( intval( $encMonth ) > $thisMonth ) {
185  $thisYear--;
186  }
187  $encYear = $thisYear;
188  } else {
189  $encYear = '';
190  }
191  $inputAttribs = [ 'id' => 'year', 'maxlength' => 4, 'size' => 7 ];
192  return self::label( wfMessage( 'year' )->text(), 'year' ) . ' ' .
193  Html::input( 'year', $encYear, 'number', $inputAttribs ) . ' ' .
194  self::label( wfMessage( 'month' )->text(), 'month' ) . ' ' .
195  self::monthSelector( $encMonth, -1 );
196  }
197 
208  public static function languageSelector( $selected, $customisedOnly = true,
209  $inLanguage = null, $overrideAttrs = [], Message $msg = null
210  ) {
211  global $wgLanguageCode;
212 
213  $include = $customisedOnly ? 'mwfile' : 'mw';
214  $languages = MediaWikiServices::getInstance()
215  ->getLanguageNameUtils()
216  ->getLanguageNames( $inLanguage, $include );
217 
218  // Make sure the site language is in the list;
219  // a custom language code might not have a defined name...
220  if ( !array_key_exists( $wgLanguageCode, $languages ) ) {
221  $languages[$wgLanguageCode] = $wgLanguageCode;
222  // Sort the array again
223  ksort( $languages );
224  }
225 
231  $selected = isset( $languages[$selected] ) ? $selected : $wgLanguageCode;
232  $options = "\n";
233  foreach ( $languages as $code => $name ) {
234  $options .= self::option( "$code - $name", $code, $code == $selected ) . "\n";
235  }
236 
237  $attrs = [ 'id' => 'wpUserLanguage', 'name' => 'wpUserLanguage' ];
238  $attrs = array_merge( $attrs, $overrideAttrs );
239 
240  if ( $msg === null ) {
241  $msg = wfMessage( 'yourlanguage' );
242  }
243  return [
244  self::label( $msg->text(), $attrs['id'] ),
245  self::tags( 'select', $attrs, $options )
246  ];
247  }
248 
256  public static function span( $text, $class, $attribs = [] ) {
257  return self::element( 'span', [ 'class' => $class ] + $attribs, $text );
258  }
259 
268  public static function wrapClass( $text, $class, $tag = 'span', $attribs = [] ) {
269  return self::tags( $tag, [ 'class' => $class ] + $attribs, $text );
270  }
271 
280  public static function input( $name, $size = false, $value = false, $attribs = [] ) {
281  $attributes = [ 'name' => $name ];
282 
283  if ( $size ) {
284  $attributes['size'] = $size;
285  }
286 
287  if ( $value !== false ) { // maybe 0
288  $attributes['value'] = $value;
289  }
290 
291  return self::element( 'input',
292  Html::getTextInputAttributes( $attributes + $attribs ) );
293  }
294 
303  public static function password( $name, $size = false, $value = false,
304  $attribs = []
305  ) {
306  return self::input( $name, $size, $value,
307  array_merge( $attribs, [ 'type' => 'password' ] ) );
308  }
309 
318  public static function attrib( $name, $present = true ) {
319  return $present ? [ $name => $name ] : [];
320  }
321 
329  public static function check( $name, $checked = false, $attribs = [] ) {
330  return self::element( 'input', array_merge(
331  [
332  'name' => $name,
333  'type' => 'checkbox',
334  'value' => 1 ],
335  self::attrib( 'checked', $checked ),
336  $attribs ) );
337  }
338 
347  public static function radio( $name, $value, $checked = false, $attribs = [] ) {
348  return self::element( 'input', [
349  'name' => $name,
350  'type' => 'radio',
351  'value' => $value ] + self::attrib( 'checked', $checked ) + $attribs );
352  }
353 
364  public static function label( $label, $id, $attribs = [] ) {
365  $a = [ 'for' => $id ];
366 
367  foreach ( [ 'class', 'title' ] as $attr ) {
368  if ( isset( $attribs[$attr] ) ) {
369  $a[$attr] = $attribs[$attr];
370  }
371  }
372 
373  return self::element( 'label', $a, $label );
374  }
375 
386  public static function inputLabel( $label, $name, $id, $size = false,
387  $value = false, $attribs = []
388  ) {
389  list( $label, $input ) = self::inputLabelSep( $label, $name, $id, $size, $value, $attribs );
390  return $label . "\u{00A0}" . $input;
391  }
392 
405  public static function inputLabelSep( $label, $name, $id, $size = false,
406  $value = false, $attribs = []
407  ) {
408  return [
409  self::label( $label, $id, $attribs ),
410  self::input( $name, $size, $value, [ 'id' => $id ] + $attribs )
411  ];
412  }
413 
425  public static function checkLabel( $label, $name, $id, $checked = false, $attribs = [] ) {
427  $chkLabel = self::check( $name, $checked, [ 'id' => $id ] + $attribs ) .
428  "\u{00A0}" .
429  self::label( $label, $id, $attribs );
430 
432  $chkLabel = self::openElement( 'div', [ 'class' => 'mw-ui-checkbox' ] ) .
433  $chkLabel . self::closeElement( 'div' );
434  }
435  return $chkLabel;
436  }
437 
450  public static function radioLabel( $label, $name, $value, $id,
451  $checked = false, $attribs = []
452  ) {
453  return self::radio( $name, $value, $checked, [ 'id' => $id ] + $attribs ) .
454  "\u{00A0}" .
455  self::label( $label, $id, $attribs );
456  }
457 
465  public static function submitButton( $value, $attribs = [] ) {
467  $baseAttrs = [
468  'type' => 'submit',
469  'value' => $value,
470  ];
471  // Done conditionally for time being as it is possible
472  // some submit forms
473  // might need to be mw-ui-destructive (e.g. delete a page)
475  $baseAttrs['class'] = 'mw-ui-button mw-ui-progressive';
476  }
477  // Any custom attributes will take precendence of anything in baseAttrs e.g. override the class
478  $attribs += $baseAttrs;
479  return Html::element( 'input', $attribs );
480  }
481 
490  public static function option( $text, $value = null, $selected = false,
491  $attribs = [] ) {
492  if ( $value !== null ) {
493  $attribs['value'] = $value;
494  }
495  if ( $selected ) {
496  $attribs['selected'] = 'selected';
497  }
498  return Html::element( 'option', $attribs, $text );
499  }
500 
514  public static function listDropDown( $name = '', $list = '', $other = '',
515  $selected = '', $class = '', $tabindex = null
516  ) {
517  $options = self::listDropDownOptions( $list, [ 'other' => $other ] );
518 
519  $xmlSelect = new XmlSelect( $name, $name, $selected );
520  $xmlSelect->addOptions( $options );
521 
522  if ( $class ) {
523  $xmlSelect->setAttribute( 'class', $class );
524  }
525  if ( $tabindex ) {
526  $xmlSelect->setAttribute( 'tabindex', $tabindex );
527  }
528 
529  return $xmlSelect->getHTML();
530  }
531 
545  public static function listDropDownOptions( $list, $params = [] ) {
546  $options = [];
547 
548  if ( isset( $params['other'] ) ) {
549  $options[ $params['other'] ] = 'other';
550  }
551 
552  $optgroup = false;
553  foreach ( explode( "\n", $list ) as $option ) {
554  $value = trim( $option );
555  if ( $value == '' ) {
556  continue;
557  } elseif ( substr( $value, 0, 1 ) == '*' && substr( $value, 1, 1 ) != '*' ) {
558  # A new group is starting...
559  $value = trim( substr( $value, 1 ) );
560  if ( $value !== '' &&
561  // Do not use the value for 'other' as option group - T251351
562  ( !isset( $params['other'] ) || $value !== $params['other'] )
563  ) {
564  $optgroup = $value;
565  } else {
566  $optgroup = false;
567  }
568  } elseif ( substr( $value, 0, 2 ) == '**' ) {
569  # groupmember
570  $opt = trim( substr( $value, 2 ) );
571  if ( $optgroup === false ) {
572  $options[$opt] = $opt;
573  } else {
574  $options[$optgroup][$opt] = $opt;
575  }
576  } else {
577  # groupless reason list
578  $optgroup = false;
579  $options[$option] = $option;
580  }
581  }
582 
583  return $options;
584  }
585 
594  public static function listDropDownOptionsOoui( $options ) {
595  $optionsOoui = [];
596 
597  foreach ( $options as $text => $value ) {
598  if ( is_array( $value ) ) {
599  $optionsOoui[] = [ 'optgroup' => (string)$text ];
600  foreach ( $value as $text2 => $value2 ) {
601  $optionsOoui[] = [ 'data' => (string)$value2, 'label' => (string)$text2 ];
602  }
603  } else {
604  $optionsOoui[] = [ 'data' => (string)$value, 'label' => (string)$text ];
605  }
606  }
607 
608  return $optionsOoui;
609  }
610 
622  public static function fieldset( $legend = false, $content = false, $attribs = [] ) {
623  $s = self::openElement( 'fieldset', $attribs ) . "\n";
624 
625  if ( $legend ) {
626  $s .= self::element( 'legend', null, $legend ) . "\n";
627  }
628 
629  if ( $content !== false ) {
630  $s .= $content . "\n";
631  $s .= self::closeElement( 'fieldset' ) . "\n";
632  }
633 
634  return $s;
635  }
636 
648  public static function textarea( $name, $content, $cols = 40, $rows = 5, $attribs = [] ) {
649  return self::element( 'textarea',
651  [
652  'name' => $name,
653  'id' => $name,
654  'cols' => $cols,
655  'rows' => $rows
656  ] + $attribs
657  ),
658  $content, false );
659  }
660 
672  public static function encodeJsVar( $value, $pretty = false ) {
673  if ( $value instanceof XmlJsCode ) {
674  return $value->value;
675  }
676  return FormatJson::encode( $value, $pretty, FormatJson::UTF8_OK );
677  }
678 
690  public static function encodeJsCall( $name, $args, $pretty = false ) {
691  foreach ( $args as &$arg ) {
692  $arg = self::encodeJsVar( $arg, $pretty );
693  if ( $arg === false ) {
694  return false;
695  }
696  }
697 
698  return "$name(" . ( $pretty
699  ? ( ' ' . implode( ', ', $args ) . ' ' )
700  : implode( ',', $args )
701  ) . ");";
702  }
703 
715  private static function isWellFormed( $text ) {
716  $parser = xml_parser_create( "UTF-8" );
717 
718  # case folding violates XML standard, turn it off
719  xml_parser_set_option( $parser, XML_OPTION_CASE_FOLDING, false );
720 
721  if ( !xml_parse( $parser, $text, true ) ) {
722  // $err = xml_error_string( xml_get_error_code( $parser ) );
723  // $position = xml_get_current_byte_index( $parser );
724  // $fragment = $this->extractFragment( $html, $position );
725  // $this->mXmlError = "$err at byte $position:\n$fragment";
726  xml_parser_free( $parser );
727  return false;
728  }
729 
730  xml_parser_free( $parser );
731 
732  return true;
733  }
734 
743  public static function isWellFormedXmlFragment( $text ) {
744  $html =
746  '<html>' .
747  $text .
748  '</html>';
749 
750  return self::isWellFormed( $html );
751  }
752 
760  public static function escapeTagsOnly( $in ) {
761  return str_replace(
762  [ '"', '>', '<' ],
763  [ '&quot;', '&gt;', '&lt;' ],
764  $in );
765  }
766 
778  public static function buildForm( $fields, $submitLabel = null, $submitAttribs = [] ) {
779  $form = '';
780  $form .= "<table><tbody>";
781 
782  foreach ( $fields as $labelmsg => $input ) {
783  $id = "mw-$labelmsg";
784  $form .= self::openElement( 'tr', [ 'id' => $id ] );
785 
786  // TODO use a <label> here for accessibility purposes - will need
787  // to either not use a table to build the form, or find the ID of
788  // the input somehow.
789 
790  $form .= self::tags( 'td', [ 'class' => 'mw-label' ], wfMessage( $labelmsg )->parse() );
791  $form .= self::openElement( 'td', [ 'class' => 'mw-input' ] )
792  . $input . self::closeElement( 'td' );
793  $form .= self::closeElement( 'tr' );
794  }
795 
796  if ( $submitLabel ) {
797  $form .= self::openElement( 'tr' );
798  $form .= self::tags( 'td', [], '' );
799  $form .= self::openElement( 'td', [ 'class' => 'mw-submit' ] )
800  . self::submitButton( wfMessage( $submitLabel )->text(), $submitAttribs )
801  . self::closeElement( 'td' );
802  $form .= self::closeElement( 'tr' );
803  }
804 
805  $form .= "</tbody></table>";
806 
807  return $form;
808  }
809 
816  public static function buildTable( $rows, $attribs = [], $headers = null ) {
817  $s = self::openElement( 'table', $attribs );
818 
819  if ( is_array( $headers ) ) {
820  $s .= self::openElement( 'thead', $attribs );
821 
822  foreach ( $headers as $id => $header ) {
823  $attribs = [];
824 
825  if ( is_string( $id ) ) {
826  $attribs['id'] = $id;
827  }
828 
829  $s .= self::element( 'th', $attribs, $header );
830  }
831  $s .= self::closeElement( 'thead' );
832  }
833 
834  foreach ( $rows as $id => $row ) {
835  $attribs = [];
836 
837  if ( is_string( $id ) ) {
838  $attribs['id'] = $id;
839  }
840 
841  $s .= self::buildTableRow( $attribs, $row );
842  }
843 
844  $s .= self::closeElement( 'table' );
845 
846  return $s;
847  }
848 
855  public static function buildTableRow( $attribs, $cells ) {
856  $s = self::openElement( 'tr', $attribs );
857 
858  foreach ( $cells as $id => $cell ) {
859  $attribs = [];
860 
861  if ( is_string( $id ) ) {
862  $attribs['id'] = $id;
863  }
864 
865  $s .= self::element( 'td', $attribs, $cell );
866  }
867 
868  $s .= self::closeElement( 'tr' );
869 
870  return $s;
871  }
872 }
Xml\isWellFormed
static isWellFormed( $text)
Check if a string is well-formed XML.
Definition: Xml.php:715
Xml\buildTableRow
static buildTableRow( $attribs, $cells)
Build a row for a table.
Definition: Xml.php:855
Xml\expandAttributes
static expandAttributes( $attribs)
Given an array of ('attributename' => 'value'), it generates the code to set the XML attributes : att...
Definition: Xml.php:67
Xml\listDropDownOptionsOoui
static listDropDownOptionsOoui( $options)
Convert options for a drop-down box into a format accepted by OOUI\DropdownInputWidget etc.
Definition: Xml.php:594
Html\getTextInputAttributes
static getTextInputAttributes(array $attrs)
Modifies a set of attributes meant for text input elements and apply a set of default attributes.
Definition: Html.php:140
MediaWiki\MediaWikiServices
MediaWikiServices is the service locator for the application scope of MediaWiki.
Definition: MediaWikiServices.php:173
Xml\label
static label( $label, $id, $attribs=[])
Convenience function to build an HTML form label.
Definition: Xml.php:364
$wgUseMediaWikiUIEverywhere
$wgUseMediaWikiUIEverywhere
Temporary variable that applies MediaWiki UI wherever it can be supported.
Definition: DefaultSettings.php:3506
Xml\textarea
static textarea( $name, $content, $cols=40, $rows=5, $attribs=[])
Shortcut for creating textareas.
Definition: Xml.php:648
Xml\radio
static radio( $name, $value, $checked=false, $attribs=[])
Convenience function to build an HTML radio button.
Definition: Xml.php:347
Xml\inputLabelSep
static inputLabelSep( $label, $name, $id, $size=false, $value=false, $attribs=[])
Same as Xml::inputLabel() but return input and label in an array.
Definition: Xml.php:405
Xml\option
static option( $text, $value=null, $selected=false, $attribs=[])
Convenience function to build an HTML drop-down list item.
Definition: Xml.php:490
wfMessage
wfMessage( $key,... $params)
This is the function for getting translated interface messages.
Definition: GlobalFunctions.php:1231
Xml\password
static password( $name, $size=false, $value=false, $attribs=[])
Convenience function to build an HTML password input field.
Definition: Xml.php:303
Xml\buildForm
static buildForm( $fields, $submitLabel=null, $submitAttribs=[])
Generate a form (without the opening form element).
Definition: Xml.php:778
Xml\openElement
static openElement( $element, $attribs=null)
This opens an XML element.
Definition: Xml.php:110
$wgLang
$wgLang
Definition: Setup.php:782
Xml\encodeJsVar
static encodeJsVar( $value, $pretty=false)
Encode a variable of arbitrary type to JavaScript.
Definition: Xml.php:672
Xml\languageSelector
static languageSelector( $selected, $customisedOnly=true, $inLanguage=null, $overrideAttrs=[], Message $msg=null)
Construct a language selector appropriate for use in a form or preferences.
Definition: Xml.php:208
FormatJson\UTF8_OK
const UTF8_OK
Skip escaping most characters above U+007F for readability and compactness.
Definition: FormatJson.php:34
Html\input
static input( $name, $value='', $type='text', array $attribs=[])
Convenience function to produce an "<input>" element.
Definition: Html.php:670
XmlSelect
Class for generating HTML <select> or <datalist> elements.
Definition: XmlSelect.php:26
Xml\fieldset
static fieldset( $legend=false, $content=false, $attribs=[])
Shortcut for creating fieldsets.
Definition: Xml.php:622
XmlJsCode
A wrapper class which causes Xml::encodeJsVar() and Xml::encodeJsCall() to interpret a given string a...
Definition: XmlJsCode.php:40
Xml\encodeJsCall
static encodeJsCall( $name, $args, $pretty=false)
Create a call to a JavaScript function.
Definition: Xml.php:690
Sanitizer\hackDocType
static hackDocType()
Hack up a private DOCTYPE with HTML's standard entity declarations.
Definition: Sanitizer.php:1597
Xml\elementClean
static elementClean( $element, $attribs=[], $contents='')
Format an XML element as with self::element(), but run text through the content language's normalize(...
Definition: Xml.php:92
FormatJson\encode
static encode( $value, $pretty=false, $escaping=0)
Returns the JSON representation of a value.
Definition: FormatJson.php:115
Xml\wrapClass
static wrapClass( $text, $class, $tag='span', $attribs=[])
Shortcut to make a specific element with a class attribute.
Definition: Xml.php:268
MWException
MediaWiki exception.
Definition: MWException.php:29
Xml\check
static check( $name, $checked=false, $attribs=[])
Convenience function to build an HTML checkbox.
Definition: Xml.php:329
Sanitizer\encodeAttribute
static encodeAttribute( $text)
Encode an attribute value for HTML output.
Definition: Sanitizer.php:723
Xml\element
static element( $element, $attribs=null, $contents='', $allowShortTag=true)
Format an XML element with given attributes and, optionally, text content.
Definition: Xml.php:41
$args
if( $line===false) $args
Definition: mcc.php:124
MWTimestamp\getInstance
static getInstance( $ts=false)
Get a timestamp instance in GMT.
Definition: MWTimestamp.php:44
$content
$content
Definition: router.php:76
$s
foreach( $mmfl['setupFiles'] as $fileName) if( $queue) if(empty( $mmfl['quiet'])) $s
Definition: mergeMessageFileList.php:206
$header
$header
Definition: updateCredits.php:37
Xml\tags
static tags( $element, $attribs, $contents)
Same as Xml::element(), but does not escape contents.
Definition: Xml.php:132
Xml\attrib
static attrib( $name, $present=true)
Internal function for use in checkboxes and radio buttons and such.
Definition: Xml.php:318
$wgLanguageCode
$wgLanguageCode
Site language code.
Definition: DefaultSettings.php:3196
Xml\span
static span( $text, $class, $attribs=[])
Shortcut to make a span element.
Definition: Xml.php:256
Xml\radioLabel
static radioLabel( $label, $name, $value, $id, $checked=false, $attribs=[])
Convenience function to build an HTML radio button with a label.
Definition: Xml.php:450
Xml\closeElement
static closeElement( $element)
Shortcut to close an XML element.
Definition: Xml.php:119
Xml\listDropDown
static listDropDown( $name='', $list='', $other='', $selected='', $class='', $tabindex=null)
Build a drop-down box from a textual list.
Definition: Xml.php:514
Xml\isWellFormedXmlFragment
static isWellFormedXmlFragment( $text)
Check if a string is a well-formed XML fragment.
Definition: Xml.php:743
Xml\dateMenu
static dateMenu( $year, $month)
Definition: Xml.php:171
Message
The Message class deals with fetching and processing of interface message into a variety of formats.
Definition: Message.php:161
Xml\input
static input( $name, $size=false, $value=false, $attribs=[])
Convenience function to build an HTML text input field.
Definition: Xml.php:280
Xml\buildTable
static buildTable( $rows, $attribs=[], $headers=null)
Definition: Xml.php:816
Html\element
static element( $element, $attribs=[], $contents='')
Identical to rawElement(), but HTML-escapes $contents (like Xml::element()).
Definition: Html.php:234
Xml\monthSelector
static monthSelector( $selected='', $allmonths=null, $id='month')
Create a date selector.
Definition: Xml.php:145
Xml\inputLabel
static inputLabel( $label, $name, $id, $size=false, $value=false, $attribs=[])
Convenience function to build an HTML text input field with a label.
Definition: Xml.php:386
Xml
Module of static functions for generating XML.
Definition: Xml.php:28
Xml\escapeTagsOnly
static escapeTagsOnly( $in)
Replace " > and < with their respective HTML entities ( ", >, <)
Definition: Xml.php:760
Xml\listDropDownOptions
static listDropDownOptions( $list, $params=[])
Build options for a drop-down box from a textual list.
Definition: Xml.php:545
Xml\submitButton
static submitButton( $value, $attribs=[])
Convenience function to build an HTML submit button When $wgUseMediaWikiUIEverywhere is true it will ...
Definition: Xml.php:465
Xml\checkLabel
static checkLabel( $label, $name, $id, $checked=false, $attribs=[])
Convenience function to build an HTML checkbox with a label.
Definition: Xml.php:425