MediaWiki
1.34.0
|
Module of static functions for generating XML. More...
Static Public Member Functions | |
static | attrib ( $name, $present=true) |
Internal function for use in checkboxes and radio buttons and such. More... | |
static | buildForm ( $fields, $submitLabel=null, $submitAttribs=[]) |
Generate a form (without the opening form element). More... | |
static | buildTable ( $rows, $attribs=[], $headers=null) |
Build a table of data. More... | |
static | buildTableRow ( $attribs, $cells) |
Build a row for a table. More... | |
static | check ( $name, $checked=false, $attribs=[]) |
Convenience function to build an HTML checkbox. More... | |
static | checkLabel ( $label, $name, $id, $checked=false, $attribs=[]) |
Convenience function to build an HTML checkbox with a label. More... | |
static | closeElement ( $element) |
Shortcut to close an XML element. More... | |
static | dateMenu ( $year, $month) |
static | element ( $element, $attribs=null, $contents='', $allowShortTag=true) |
Format an XML element with given attributes and, optionally, text content. More... | |
static | elementClean ( $element, $attribs=[], $contents='') |
Format an XML element as with self::element(), but run text through the content language's normalize() validator first to ensure that no invalid UTF-8 is passed. More... | |
static | encodeJsCall ( $name, $args, $pretty=false) |
Create a call to a JavaScript function. More... | |
static | encodeJsVar ( $value, $pretty=false) |
Encode a variable of arbitrary type to JavaScript. More... | |
static | escapeTagsOnly ( $in) |
Replace " > and < with their respective HTML entities ( ", >, <) More... | |
static | expandAttributes ( $attribs) |
Given an array of ('attributename' => 'value'), it generates the code to set the XML attributes : attributename="value". More... | |
static | fieldset ( $legend=false, $content=false, $attribs=[]) |
Shortcut for creating fieldsets. More... | |
static | input ( $name, $size=false, $value=false, $attribs=[]) |
Convenience function to build an HTML text input field. More... | |
static | inputLabel ( $label, $name, $id, $size=false, $value=false, $attribs=[]) |
Convenience function to build an HTML text input field with a label. More... | |
static | inputLabelSep ( $label, $name, $id, $size=false, $value=false, $attribs=[]) |
Same as Xml::inputLabel() but return input and label in an array. More... | |
static | isWellFormedXmlFragment ( $text) |
Check if a string is a well-formed XML fragment. More... | |
static | label ( $label, $id, $attribs=[]) |
Convenience function to build an HTML form label. More... | |
static | languageSelector ( $selected, $customisedOnly=true, $inLanguage=null, $overrideAttrs=[], Message $msg=null) |
Construct a language selector appropriate for use in a form or preferences. More... | |
static | listDropDown ( $name='', $list='', $other='', $selected='', $class='', $tabindex=null) |
Build a drop-down box from a textual list. More... | |
static | listDropDownOptions ( $list, $params=[]) |
Build options for a drop-down box from a textual list. More... | |
static | listDropDownOptionsOoui ( $options) |
Convert options for a drop-down box into a format accepted by OOUI\DropdownInputWidget etc. More... | |
static | monthSelector ( $selected='', $allmonths=null, $id='month') |
Create a date selector. More... | |
static | openElement ( $element, $attribs=null) |
This opens an XML element. More... | |
static | option ( $text, $value=null, $selected=false, $attribs=[]) |
Convenience function to build an HTML drop-down list item. More... | |
static | password ( $name, $size=false, $value=false, $attribs=[]) |
Convenience function to build an HTML password input field. More... | |
static | radio ( $name, $value, $checked=false, $attribs=[]) |
Convenience function to build an HTML radio button. More... | |
static | radioLabel ( $label, $name, $value, $id, $checked=false, $attribs=[]) |
Convenience function to build an HTML radio button with a label. More... | |
static | span ( $text, $class, $attribs=[]) |
Shortcut to make a span element. More... | |
static | submitButton ( $value, $attribs=[]) |
Convenience function to build an HTML submit button When $wgUseMediaWikiUIEverywhere is true it will default to a progressive button. More... | |
static | tags ( $element, $attribs, $contents) |
Same as Xml::element(), but does not escape contents. More... | |
static | textarea ( $name, $content, $cols=40, $rows=5, $attribs=[]) |
Shortcut for creating textareas. More... | |
static | wrapClass ( $text, $class, $tag='span', $attribs=[]) |
Shortcut to make a specific element with a class attribute. More... | |
Static Private Member Functions | |
static | isWellFormed ( $text) |
Check if a string is well-formed XML. More... | |
|
static |
|
static |
Generate a form (without the opening form element).
Output optionally includes a submit button.
array | $fields | Associative array, key is the name of a message that contains a description for the field, value is an HTML string containing the appropriate input. |
string | null | $submitLabel | The name of a message containing a label for the submit button. |
array | $submitAttribs | The attributes to add to the submit button |
Definition at line 765 of file Xml.php.
References closeElement(), openElement(), submitButton(), tags(), and wfMessage().
|
static |
Build a table of data.
array | $rows | An array of arrays of strings, each to be a row in a table |
array | $attribs | An array of attributes to apply to the table tag [optional] |
array | null | $headers | An array of strings to use as table headers [optional] |
Definition at line 804 of file Xml.php.
References $header, $s, buildTableRow(), closeElement(), element(), and openElement().
|
static |
Build a row for a table.
array | $attribs | An array of attributes to apply to the tr tag |
array | $cells | An array of strings to put in |
Definition at line 843 of file Xml.php.
References $s, closeElement(), element(), and openElement().
Referenced by buildTable().
|
static |
Convenience function to build an HTML checkbox.
string | $name | Value of the name attribute |
bool | $checked | Whether the checkbox is checked or not |
array | $attribs | Array other attributes |
Definition at line 323 of file Xml.php.
References element().
Referenced by checkLabel(), SpecialUndelete\formatFileRow(), SpecialUndelete\formatRevisionRow(), WebInstaller\getCheckBox(), SpecialRecentChangesLinked\getExtraOptions(), HTMLCheckField\getInputHTML(), HTMLMultiSelectField\getOneCheckbox(), HTMLCheckMatrix\getOneCheckboxHTML(), LogEventsList\getShowHideLinks(), HistoryPager\historyLine(), SpecialNuke\listForm(), and SpecialReplaceText\pageListForm().
|
static |
Convenience function to build an HTML checkbox with a label.
string | $label | |
string | $name | |
string | $id | |
bool | $checked | |
array | $attribs |
Definition at line 419 of file Xml.php.
References $wgUseMediaWikiUIEverywhere, check(), closeElement(), label(), and openElement().
Referenced by SpecialEditTags\buildCheckBoxes(), SpecialRevisionDelete\buildCheckBoxes(), ProtectionForm\buildForm(), SpecialWatchlist\doHeader(), SpecialRenameuser\execute(), UserrightsPage\groupCheckboxes(), SpecialRecentChanges\namespaceFilterForm(), SpecialReplaceText\namespaceTables(), SpecialReplaceText\pageListForm(), MediaWiki\Widget\Search\SearchFormWidget\powerSearchBox(), EditPage\showEditForm(), SpecialImport\showForm(), SpecialReplaceText\showForm(), and SpecialWhatLinksHere\whatlinkshereForm().
|
static |
Shortcut to close an XML element.
string | $element | Element name |
Definition at line 117 of file Xml.php.
Referenced by ProtectionForm\buildForm(), buildForm(), buildTable(), buildTableRow(), checkLabel(), SpecialRecentChanges\doHeader(), SpecialWatchlist\doHeader(), SpecialRenameuser\execute(), SpecialStatistics\execute(), SpecialPasswordPolicies\execute(), SpecialListGroupRights\execute(), CategoryTreePage\execute(), QueryPage\execute(), SiteExporter\exportSite(), SiteExporter\exportSites(), fieldset(), SpecialStatistics\formatRowHeader(), InputBox\getCommentForm(), InputBox\getCreateForm(), SpecialStatistics\getEditStats(), SpecialVersion\getExtensionCredits(), InputBox\getMoveForm(), SpecialStatistics\getPageStats(), InputBox\getSearchForm(), InputBox\getSearchForm2(), SpecialVersion\getSkinCredits(), CategoryTree\getTag(), SpecialStatistics\getUserStats(), UserrightsPage\groupCheckboxes(), SpecialWhatLinksHere\listEnd(), SpecialReplaceText\namespaceTables(), ImagePage\openShowImage(), SpecialListGroupRights\outputNamespaceProtectionInfo(), CategoryTree\renderNodeInfo(), CategoryTree\renderParents(), SpecialWatchlist\setTopText(), EditPage\showEditForm(), UserrightsPage\showEditUserGroupsForm(), SpecialEditTags\showForm(), SpecialImport\showForm(), SpecialRevisionDelete\showForm(), SpecialReplaceText\showForm(), SpecialMergeHistory\showHistory(), SpecialWhatLinksHere\showIndirectLinks(), SpecialGadgets\showMainForm(), SpecialMergeHistory\showMergeForm(), SpecialUndelete\showRevision(), SpecialVersion\softwareInformation(), ImagePage\view(), SpecialWhatLinksHere\whatlinkshereForm(), and XmlDumpWriter\writeSlot().
|
static |
int | string | $year | Use '' or 0 to start with no year preselected. |
int | string | $month | A month in the 1..12 range. Use '', 0 or -1 to start with no month preselected. |
Definition at line 167 of file Xml.php.
References MWTimestamp\getInstance(), label(), monthSelector(), and wfMessage().
|
static |
Format an XML element with given attributes and, optionally, text content.
Element and attribute names are assumed to be ready for literal inclusion. Strings are assumed to not contain XML-illegal characters; special characters (<, >, &) are escaped but illegals are not touched.
string | $element | Element name |
array | null | $attribs | Name=>value pairs. Values will be escaped. |
string | $contents | Null to make an open tag only; '' for a contentless closed tag (default) |
bool | $allowShortTag | Whether '' in $contents will result in a contentless closed tag |
Definition at line 41 of file Xml.php.
References expandAttributes().
Referenced by ImageHistoryList\beginImageHistoryList(), SpecialEditTags\buildCheckBoxes(), ProtectionForm\buildForm(), buildTable(), buildTableRow(), XmlDumpWriter\caseSetting(), check(), TextPassDumper\clearOpenElement(), Article\confirmDelete(), MediaWiki\Preferences\DefaultPreferencesFactory\datetimePreferences(), XmlDumpWriter\dbname(), Article\delete(), HistoryPager\diffButtons(), Article\doDelete(), SpecialWatchlist\doHeader(), SpecialTags\doTagRow(), WikiEditorHooks\editPageShowEditFormFields(), elementClean(), SpecialRenameuser\execute(), SpecialListGroupRights\execute(), SpecialPasswordPolicies\execute(), SiteExporter\exportSite(), fieldset(), ImageListPager\formatValue(), XmlDumpWriter\generator(), SpecialVersion\getExtensionCredits(), QuestyCaptcha\getFormInformation(), SpecialVersion\getMediaWikiCredits(), Skin\getNewtalks(), InputBox\getSearchForm(), InputBox\getSearchForm2(), SpecialVersion\getSkinCredits(), UserrightsPage\groupCheckboxes(), XmlDumpWriter\homelink(), ImageHistoryList\imageHistoryLine(), input(), ChangesList\insertDateHeader(), label(), MediaWiki\Widget\Search\SearchFormWidget\makeSearchLink(), XmlDumpWriter\namespaces(), XmlDumpWriter\openPage(), XmlDumpWriter\openStream(), Licenses\outputOption(), SpecialReplaceText\pageListForm(), SpecialChangeContentModel\postText(), radio(), EnhancedChangesList\recentChangesBlock(), ImageMap\render(), InputBox\render(), SpecialSearch\setupPage(), EditPage\showEditForm(), UserrightsPage\showEditUserGroupsForm(), SpecialReplaceText\showForm(), SpecialUndelete\showHistory(), SpecialRenameuser\showLogExtract(), ProtectionForm\showLogExtract(), SpecialPageLanguage\showLogFragment(), MovePageForm\showLogFragment(), UserrightsPage\showLogFragment(), SpecialMergeHistory\showMergeForm(), SpecialUndelete\showRevision(), XmlDumpWriter\sitename(), SpecialVersion\softwareInformation(), span(), textarea(), ThumbnailImage\toHtml(), MediaWiki\Preferences\DefaultPreferencesFactory\validateSignature(), ImagePage\view(), XmlDumpWriter\writeContributor(), XmlDumpWriter\writeLogItem(), XmlDumpWriter\writeRevision(), XmlDumpWriter\writeSlot(), XmlDumpWriter\writeTimestamp(), and XmlDumpWriter\writeUpload().
|
static |
Format an XML element as with self::element(), but run text through the content language's normalize() validator first to ensure that no invalid UTF-8 is passed.
string | $element | |
array | $attribs | Name=>value pairs. Values will be escaped. |
string | $contents | Null to make an open tag only; '' for a contentless closed tag (default) |
Definition at line 90 of file Xml.php.
References element().
Referenced by XmlDumpWriter\openPage(), XmlDumpWriter\writeContributor(), XmlDumpWriter\writeLogItem(), XmlDumpWriter\writeRevision(), XmlDumpWriter\writeText(), and XmlDumpWriter\writeUpload().
|
static |
Create a call to a JavaScript function.
The supplied arguments will be encoded using Xml::encodeJsVar().
string | $name | The name of the function to call, or a JavaScript expression which evaluates to a function object which is called. |
array | $args | The arguments to pass to the function. |
bool | $pretty | If true, add non-significant whitespace to improve readability. |
Definition at line 677 of file Xml.php.
References $args, and encodeJsVar().
Referenced by SpecialJavaScriptTest\exportQUnit(), ResourceLoaderSyntaxHighlightVisualEditorModule\getScript(), GadgetHooks\makeLegacyWarning(), and JavaScriptContentHandler\makeRedirectContent().
|
static |
Encode a variable of arbitrary type to JavaScript.
If the value is an XmlJsCode object, pass through the object's value verbatim.
mixed | $value | The value being encoded. Can be any type except a resource. |
bool | $pretty | If true, add non-significant whitespace to improve readability. |
Definition at line 659 of file Xml.php.
References FormatJson\encode(), and FormatJson\UTF8_OK.
Referenced by encodeJsCall(), XmlJsCode\encodeObject(), SpecialJavaScriptTest\exportQUnit(), ScribuntoHooks\validateScript(), and ResourceLoaderModule\validateScriptFile().
|
static |
|
static |
Given an array of ('attributename' => 'value'), it generates the code to set the XML attributes : attributename="value".
The values are passed to Sanitizer::encodeAttribute. Returns null or empty string if no attributes given.
array | null | $attribs | Array of attributes for an XML element |
MWException |
Definition at line 67 of file Xml.php.
Referenced by element(), VectorTemplate\execute(), openElement(), and Linker\tooltip().
|
static |
Shortcut for creating fieldsets.
string | bool | $legend | Legend of the fieldset. If evaluates to false, legend is not added. |
string | false | $content | Pre-escaped content for the fieldset. If false, only open fieldset is returned. |
array | $attribs | Any attributes to fieldset-element. |
Definition at line 609 of file Xml.php.
References $content, $s, closeElement(), element(), and openElement().
Referenced by SpecialRecentChanges\doHeader(), SpecialWhatLinksHere\getFilterPanel(), HTMLFormFieldCloner\getInputHTMLForKey(), HTMLFormFieldCloner\getInputOOUIForKey(), SpecialEditTags\showForm(), SpecialImport\showForm(), SpecialRevisionDelete\showForm(), UserrightsPage\switchForm(), SpecialWhatLinksHere\whatlinkshereForm(), HTMLForm\wrapFieldSetSection(), and HTMLForm\wrapForm().
|
static |
Convenience function to build an HTML text input field.
string | $name | Value of the name attribute |
int | false | $size | Value of the size attribute |
mixed | $value | Value of the value attribute |
array | $attribs | Other attributes |
Definition at line 274 of file Xml.php.
References element().
Referenced by ProtectionForm\buildForm(), ChangeTags\buildTagFilterSelector(), SpecialRenameuser\execute(), SpecialRecentChangesLinked\getExtraOptions(), SpecialImport\getMappingFormPart(), WebInstaller\getTextBox(), UserrightsPage\groupCheckboxes(), inputLabelSep(), password(), UserrightsPage\showEditUserGroupsForm(), SpecialEditTags\showForm(), SpecialImport\showForm(), SpecialRevisionDelete\showForm(), SpecialReplaceText\showForm(), SpecialMergeHistory\showHistory(), and SpecialMergeHistory\showMergeForm().
|
static |
Convenience function to build an HTML text input field with a label.
string | $label | Text of the label |
string | $name | Value of the name attribute |
string | $id | Id of the input |
int | bool | $size | Value of the size attribute |
string | bool | $value | Value of the value attribute |
array | $attribs | Other attributes |
Definition at line 380 of file Xml.php.
References inputLabelSep().
Referenced by SpecialNuke\listForm(), UserrightsPage\switchForm(), and SpecialWhatLinksHere\whatlinkshereForm().
|
static |
Same as Xml::inputLabel() but return input and label in an array.
string | $label | |
string | $name | |
string | $id | |
int | bool | $size | |
string | bool | $value | |
array | $attribs |
Definition at line 399 of file Xml.php.
References input(), and label().
Referenced by inputLabel().
|
staticprivate |
Check if a string is well-formed XML.
Must include the surrounding tag. This function is a DoS vector if an attacker can define entities in $text.
string | $text | String to test. |
Definition at line 702 of file Xml.php.
Referenced by isWellFormedXmlFragment().
|
static |
Check if a string is a well-formed XML fragment.
Wraps fragment in an \<html\> bit and doctype, so it can be a fragment and can use HTML named entities.
string | $text |
Definition at line 730 of file Xml.php.
References isWellFormed().
|
static |
Convenience function to build an HTML form label.
string | $label | Text of the label |
string | $id | |
array | $attribs | An attribute array. This will usually be the same array as is passed to the corresponding input element, so this function will cherry-pick appropriate attributes to apply to the label as well; only class and title are applied. |
Definition at line 358 of file Xml.php.
References element().
Referenced by ProtectionForm\buildForm(), checkLabel(), dateMenu(), SpecialRenameuser\execute(), SpecialRecentChangesLinked\getExtraOptions(), InputBox\getSearchForm(), SpecialEditTags\getTagSelect(), inputLabelSep(), languageSelector(), SpecialRecentChanges\namespaceFilterForm(), radioLabel(), UserrightsPage\showEditUserGroupsForm(), SpecialEditTags\showForm(), SpecialImport\showForm(), SpecialRevisionDelete\showForm(), SpecialMergeHistory\showHistory(), and SpecialMergeHistory\showMergeForm().
|
static |
Construct a language selector appropriate for use in a form or preferences.
string | $selected | The language code of the selected language |
bool | $customisedOnly | If true only languages which have some content are listed |
string | null | $inLanguage | The ISO code of the language to display the select list in |
array | $overrideAttrs | Override the attributes of the select tag (since 1.20) |
Message | null | $msg | Label message key (since 1.20) |
Definition at line 204 of file Xml.php.
References $languages, $wgLanguageCode, Language\fetchLanguageNames(), label(), option(), and wfMessage().
|
static |
Build a drop-down box from a textual list.
This is a wrapper for Xml::listDropDownOptions() plus the XmlSelect class.
string | $name | Name and id for the drop-down |
string | $list | Correctly formatted text (newline delimited) to be used to generate the options. |
string | $other | Text for the "Other reasons" option |
string | $selected | Option which should be pre-selected |
string | $class | CSS classes for the drop-down |
int | null | $tabindex | Value of the tabindex attribute |
Definition at line 508 of file Xml.php.
References listDropDownOptions().
Referenced by ProtectionForm\buildForm(), and SpecialRevisionDelete\showForm().
|
static |
Build options for a drop-down box from a textual list.
The result of this function can be passed to XmlSelect::addOptions() (to render a plain <select>
dropdown box) or to Xml::listDropDownOptionsOoui() and then OOUI\DropdownInputWidget() (to render a pretty one).
string | $list | Correctly formatted text (newline delimited) to be used to generate the options. |
array | $params | Extra parameters:
|
Definition at line 539 of file Xml.php.
Referenced by Article\confirmDelete(), HTMLFormField\getOptions(), listDropDown(), and FileDeleteForm\showForm().
|
static |
Convert options for a drop-down box into a format accepted by OOUI\DropdownInputWidget etc.
TODO Find a better home for this function.
array | $options | Options, as returned e.g. by Xml::listDropDownOptions() |
Definition at line 581 of file Xml.php.
Referenced by Article\confirmDelete(), HTMLMultiSelectField\getInputOOUI(), HTMLFormField\getOptionsOOUI(), and FileDeleteForm\showForm().
|
static |
Create a date selector.
string | $selected | The month which should be selected, default ''. |
string | null | $allmonths | Value of a special item denoting all month. Null to not include (default). |
string | $id | Element identifier |
Definition at line 143 of file Xml.php.
References $wgLang, and wfMessage().
Referenced by dateMenu().
|
static |
This opens an XML element.
string | $element | Name of the element |
array | null | $attribs | Array of attributes, see Xml::expandAttributes() |
Definition at line 108 of file Xml.php.
References expandAttributes().
Referenced by ImageHistoryList\beginImageHistoryList(), ProtectionForm\buildForm(), buildForm(), buildTable(), buildTableRow(), checkLabel(), EditPage\displayPreviewArea(), SpecialRecentChanges\doHeader(), SpecialWatchlist\doHeader(), SpecialRenameuser\execute(), SpecialStatistics\execute(), SpecialPasswordPolicies\execute(), SpecialListGroupRights\execute(), CategoryTreePage\execute(), QueryPage\execute(), SiteExporter\exportSite(), SiteExporter\exportSites(), fieldset(), SpecialStatistics\formatRowHeader(), InputBox\getCommentForm(), InputBox\getCreateForm(), SpecialStatistics\getEditStats(), SpecialVersion\getExtensionCredits(), InputBox\getMoveForm(), SpecialStatistics\getPageStats(), InputBox\getSearchForm(), InputBox\getSearchForm2(), SpecialVersion\getSkinCredits(), AllMessagesTablePager\getStartBody(), SpecialStatistics\getUserStats(), UserrightsPage\groupCheckboxes(), SpecialNuke\listForm(), SpecialWhatLinksHere\listItem(), SpecialWhatLinksHere\listStart(), SpecialReplaceText\namespaceTables(), ImagePage\openShowImage(), SpecialListGroupRights\outputNamespaceProtectionInfo(), SpecialReplaceText\pageListForm(), MediaWiki\Widget\Search\SearchFormWidget\render(), CategoryTree\renderNodeInfo(), CategoryTree\renderParents(), SpecialWatchlist\setTopText(), EditPage\showEditForm(), UserrightsPage\showEditUserGroupsForm(), SpecialUndelete\showFileConfirmationForm(), SpecialEditTags\showForm(), SpecialImport\showForm(), SpecialRevisionDelete\showForm(), SpecialReplaceText\showForm(), SpecialMergeHistory\showHistory(), LogEventsList\showLogExtract(), SpecialMergeHistory\showMergeForm(), Article\showMissingArticle(), SpecialUndelete\showRevision(), SpecialVersion\softwareInformation(), tags(), TraditionalImageGallery\toHTML(), SpecialRevisionDelete\tryShowFile(), ImagePage\view(), SpecialWhatLinksHere\whatlinkshereForm(), and XmlDumpWriter\writeSlot().
|
static |
Convenience function to build an HTML drop-down list item.
string | $text | Text for this item. Will be HTML escaped |
string | null | $value | Form submission value; if empty, use text |
bool | $selected | If true, will be the default selected item |
array | $attribs | Optional additional HTML attributes |
Definition at line 484 of file Xml.php.
Referenced by ImagePage\createXmlOptionStringForLanguage(), ImagePage\doRenderLangOpt(), XmlSelect\formatOptions(), languageSelector(), ImagePage\openShowImage(), and SpecialImport\showForm().
|
static |
Convenience function to build an HTML password input field.
string | $name | Value of the name attribute |
int | false | $size | Value of the size attribute |
mixed | $value | Value of the value attribute |
array | $attribs | Other attributes |
Definition at line 297 of file Xml.php.
References input().
|
static |
Convenience function to build an HTML radio button.
string | $name | Value of the name attribute |
string | $value | Value of the value attribute |
bool | $checked | Whether the checkbox is checked or not |
array | $attribs | Other attributes |
Definition at line 341 of file Xml.php.
References element().
Referenced by SpecialRevisionDelete\buildCheckBoxes(), HTMLRadioField\formatOptions(), SpecialMergeHistory\formatRevisionRow(), WebInstaller\getRadioElements(), and radioLabel().
|
static |
Convenience function to build an HTML radio button with a label.
string | $label | |
string | $name | |
string | $value | |
string | $id | |
bool | $checked | |
array | $attribs |
Definition at line 444 of file Xml.php.
References label(), and radio().
Referenced by WebInstallerDBConnect\execute(), HTMLSizeFilterField\getInputHTML(), and SpecialImport\getMappingFormPart().
|
static |
|
static |
Convenience function to build an HTML submit button When $wgUseMediaWikiUIEverywhere is true it will default to a progressive button.
string | $value | Label text for the button (unescaped) |
array | $attribs | Optional custom attributes |
Definition at line 459 of file Xml.php.
References $wgUseMediaWikiUIEverywhere.
Referenced by ProtectionForm\buildForm(), buildForm(), SpecialRecentChanges\doHeader(), SpecialWatchlist\doHeader(), ImagePage\doRenderLangOpt(), SpecialRenameuser\execute(), VFormHTMLForm\getButtons(), HTMLForm\getButtons(), SpecialNuke\listForm(), ImagePage\openShowImage(), SpecialReplaceText\pageListForm(), SpecialWatchlist\setTopText(), UserrightsPage\showEditUserGroupsForm(), SpecialUndelete\showFileConfirmationForm(), SpecialEditTags\showForm(), SpecialImport\showForm(), SpecialRevisionDelete\showForm(), SpecialReplaceText\showForm(), SpecialMergeHistory\showHistory(), SpecialMergeHistory\showMergeForm(), UserrightsPage\switchForm(), SpecialRevisionDelete\tryShowFile(), and SpecialWhatLinksHere\whatlinkshereForm().
|
static |
Same as Xml::element(), but does not escape contents.
Handy when the content you have is already valid xml.
string | $element | Element name |
array | null | $attribs | Array of attributes |
string | $contents | Content of the element |
Definition at line 130 of file Xml.php.
References openElement().
Referenced by SpecialRevisionDelete\buildCheckBoxes(), buildForm(), ImportReporter\close(), CategoryTree\createCountString(), SpecialRecentChanges\doHeader(), SpecialTags\doTagRow(), SpecialUndelete\formatRevisionRow(), SpecialStatistics\formatRowHeader(), ChangeTags\formatSummaryRow(), PreferencesFormOOUI\getButtons(), SpecialStatistics\getEditStats(), McrUndoAction\getFormFields(), ChangeTagsRevisionItem\getHTML(), ChangeTagsLogItem\getHTML(), RevDelRevisionItem\getHTML(), SpecialStatistics\getPageStats(), WebInstaller\getRadioElements(), HistoryPager\getStartBody(), EditPage\getSummaryPreview(), SpecialStatistics\getUserStats(), UserrightsPage\groupCheckboxes(), HistoryPager\historyLine(), WebInstaller\label(), MediaTransformOutput\linkWrap(), SpecialNuke\listForm(), SpecialWhatLinksHere\listItem(), ImagePage\openShowImage(), MediaWiki\Widget\Search\SearchFormWidget\profileTabsHtml(), InputBox\render(), CategoryTree\renderNodeInfo(), Linker\revDeleteLink(), Linker\revDeleteLinkDisabled(), MediaWiki\Widget\Search\SearchFormWidget\shortDialogHtml(), SpecialRevisionDelete\showForm(), SpecialReplaceText\showForm(), SpecialTags\showTagList(), wrapClass(), PreferencesFormOOUI\wrapForm(), and TableDiffFormatter\wrapLine().
|
static |
Shortcut for creating textareas.
string | $name | The 'name' for the textarea |
string | $content | Content for the textarea |
int | $cols | The number of columns for the textarea |
int | $rows | The number of rows for the textarea |
array | $attribs | Any other attributes for the textarea |
Definition at line 635 of file Xml.php.
References $content, and element().
Referenced by WebInstaller\getTextArea(), SpecialExpandTemplates\makeOutput(), and SpecialReplaceText\showForm().
|
static |
Shortcut to make a specific element with a class attribute.
string | $text | Content of the element, will be escaped |
string | $class | Class name of the span element |
string | $tag | Element name |
array | $attribs | Other attributes |
Definition at line 262 of file Xml.php.
References tags().
Referenced by SpecialWhatLinksHere\listItem().