Static Public Member Functions | |
static | element ($element, $attribs=null, $contents= '', $allowShortTag=true) |
Format an XML element with given attributes and, optionally, text content. | |
static | expandAttributes ($attribs) |
Given an array of ('attributename' => 'value'), it generates the code to set the XML attributes : attributename="value". | |
static | elementClean ($element, $attribs=array(), $contents= '') |
Format an XML element as with self::element(), but run text through the UtfNormal::cleanUp() validator first to ensure that no invalid UTF-8 is passed. | |
static | openElement ($element, $attribs=null) |
This opens an XML element. | |
static | closeElement ($element) |
Shortcut to close an XML element. | |
static | tags ($element, $attribs=null, $contents) |
Same as Xml::element(), but does not escape contents. | |
static | namespaceSelector ($selected= '', $all=null, $element_name= 'namespace', $label=null) |
Build a drop-down box for selecting a namespace. | |
static | monthSelector ($selected= '', $allmonths=null, $id= 'month') |
Create a date selector. | |
static | dateMenu ($year, $month) |
static | languageSelector ($selected, $customisedOnly=true) |
static | span ($text, $class, $attribs=array()) |
Shortcut to make a span element. | |
static | wrapClass ($text, $class, $tag='span', $attribs=array()) |
Shortcut to make a specific element with a class attribute. | |
static | input ($name, $size=false, $value=false, $attribs=array()) |
Convenience function to build an HTML text input field. | |
static | password ($name, $size=false, $value=false, $attribs=array()) |
Convenience function to build an HTML password input field. | |
static | attrib ($name, $present=true) |
Internal function for use in checkboxes and radio buttons and such. | |
static | check ($name, $checked=false, $attribs=array()) |
Convenience function to build an HTML checkbox. | |
static | radio ($name, $value, $checked=false, $attribs=array()) |
Convenience function to build an HTML radio button. | |
static | label ($label, $id) |
Convenience function to build an HTML form label. | |
static | inputLabel ($label, $name, $id, $size=false, $value=false, $attribs=array()) |
Convenience function to build an HTML text input field with a label. | |
static | inputLabelSep ($label, $name, $id, $size=false, $value=false, $attribs=array()) |
Same as Xml::inputLabel() but return input and label in an array. | |
static | checkLabel ($label, $name, $id, $checked=false, $attribs=array()) |
Convenience function to build an HTML checkbox with a label. | |
static | radioLabel ($label, $name, $value, $id, $checked=false, $attribs=array()) |
Convenience function to build an HTML radio button with a label. | |
static | submitButton ($value, $attribs=array()) |
Convenience function to build an HTML submit button. | |
static | hidden ($name, $value, $attribs=array()) |
Convenience function to build an HTML hidden form field. | |
static | option ($text, $value=null, $selected=false, $attribs=array()) |
Convenience function to build an HTML drop-down list item. | |
static | listDropDown ($name= '', $list= '', $other= '', $selected= '', $class= '', $tabindex=Null) |
Build a drop-down box from a textual list. | |
static | fieldset ($legend=false, $content=false, $attribs=array()) |
Shortcut for creating fieldsets. | |
static | textarea ($name, $content, $cols=40, $rows=5, $attribs=array()) |
Shortcut for creating textareas. | |
static | escapeJsString ($string) |
Returns an escaped string suitable for inclusion in a string literal for JavaScript source code. | |
static | encodeJsVar ($value) |
Encode a variable of unknown type to JavaScript. | |
static | isWellFormed ($text) |
Check if a string is well-formed XML. | |
static | isWellFormedXmlFragment ($text) |
Check if a string is a well-formed XML fragment. | |
static | escapeTagsOnly ($in) |
Replace " > and < with their respective HTML entities ( ", >, <). | |
static | buildForm ($fields, $submitLabel=null) |
Generate a form (without the opening form element). | |
static | buildTable ($rows, $attribs=array(), $headers=null) |
Build a table of data. | |
static | buildTableRow ($attribs, $cells) |
Build a row for a table. |
Definition at line 7 of file Xml.php.
static Xml::attrib | ( | $ | name, | |
$ | present = true | |||
) | [static] |
Internal function for use in checkboxes and radio buttons and such.
Definition at line 299 of file Xml.php.
References $name.
Referenced by wfAttrib().
static Xml::buildForm | ( | $ | fields, | |
$ | submitLabel = null | |||
) | [static] |
Generate a form (without the opening form element).
Output optionally includes a submit button.
$fields | Associative array, key is message corresponding to a description for the field (colon is in the message), value is appropriate input. | |
$submitLabel | A message containing a label for the submit button. |
Definition at line 668 of file Xml.php.
Referenced by RestrictUserForm::namespaceRestrictionForm(), RestrictUserForm::pageRestrictionForm(), RestrictUserForm::selectUserForm(), wfBuildForm(), and wfSpecialRemoveRestrictions().
static Xml::buildTable | ( | $ | rows, | |
$ | attribs = array() , |
|||
$ | headers = null | |||
) | [static] |
static Xml::buildTableRow | ( | $ | attribs, | |
$ | cells | |||
) | [static] |
static Xml::check | ( | $ | name, | |
$ | checked = false , |
|||
$ | attribs = array() | |||
) | [static] |
Convenience function to build an HTML checkbox.
$name | value of the name attribute | |
$checked | Whether the checkbox is checked or not | |
$attribs | other attributes |
Definition at line 310 of file Xml.php.
References $name, and element().
Referenced by WatchlistEditor::buildRemoveLine(), checkLabel(), UndeleteForm::formatFileRow(), UndeleteForm::formatRevisionRow(), EditPage::getCheckboxes(), SpecialRecentchangeslinked::getExtraOptions(), PreferencesForm::mainPrefsForm(), SpecialSearchOld::powerSearchBox(), SpecialSearch::powerSearchBox(), and wfCheck().
static Xml::checkLabel | ( | $ | label, | |
$ | name, | |||
$ | id, | |||
$ | checked = false , |
|||
$ | attribs = array() | |||
) | [static] |
Convenience function to build an HTML checkbox with a label.
Definition at line 374 of file Xml.php.
References $name, check(), and label().
Referenced by SpecialRevisionDelete::buildCheckBoxes(), ProtectionForm::buildForm(), SpecialRecentChanges::categoryFilterForm(), Article::confirmDelete(), SpecialExport::execute(), ProtectedPagesForm::getCascadeCheck(), ProtectedPagesForm::getExpiryCheck(), UsersPager::getPageHeader(), LogEventsList::getTitlePattern(), UserrightsPage::groupCheckboxes(), SpecialRecentChanges::namespaceFilterForm(), SpecialSearch::namespaceTables(), SpecialSearchOld::powerSearchBox(), EditPage::showEditForm(), SpecialResetpass::showForm(), MovePageForm::showForm(), SpecialImport::showForm(), EmailUserForm::showForm(), FileDeleteForm::showForm(), UndeleteForm::showHistory(), wfCheckLabel(), and wfSpecialWatchlist().
static Xml::closeElement | ( | $ | element | ) | [static] |
Shortcut to close an XML element.
$element | element name |
Definition at line 95 of file Xml.php.
Referenced by EditPage::blockedPage(), ProtectionForm::buildForm(), ProtectionForm::buildSelector(), Article::confirmDelete(), SpecialRecentChanges::doHeader(), DelegatingContentHandler::endElement(), SpecialStatistics::execute(), SpecialListGroupRights::execute(), FilepathForm::execute(), SpecialExport::execute(), SpecialVersion::extensionCredits(), fieldset(), SpecialNewpages::form(), SpecialStatistics::formatRow(), SpecialSearch::formHeader(), SpecialStatistics::getEditStats(), ImageListPager::getForm(), DeletedContributionsPage::getForm(), SpecialContributions::getForm(), WithoutInterwikiPage::getPageHeader(), UsersPager::getPageHeader(), SpecialStatistics::getPageStats(), SpecialStatistics::getUserStats(), SpecialStatistics::getViewsStats(), UserrightsPage::groupCheckboxes(), Linker::link(), listDropDown(), WhatLinksHerePage::listEnd(), PreferencesForm::mainPrefsForm(), UploadForm::mainUploadForm(), SpecialBookSources::makeForm(), monthSelector(), SpecialAllpages::namespaceForm(), SpecialPrefixindex::namespacePrefixForm(), namespaceSelector(), SpecialSearch::namespaceTables(), ImagePage::openShowImage(), SpecialSearchOld::powerSearchBox(), SpecialSearch::powerSearchBox(), OutputPage::readOnlyPage(), ApiFormatXml::recXmlPrint(), IPUnblockForm::searchForm(), SpecialSearchOld::shortDialog(), SpecialSearch::shortDialog(), UserrightsPage::showEditUserGroupsForm(), SpecialResetpass::showForm(), MovePageForm::showForm(), IPUnblockForm::showForm(), SpecialImport::showForm(), EmailUserForm::showForm(), FileDeleteForm::showForm(), UndeleteForm::showHistory(), MergehistoryForm::showHistory(), SpecialRevisionDelete::showImages(), WhatLinksHerePage::showIndirectLinks(), SpecialRevisionDelete::showLogItems(), MergehistoryForm::showMergeForm(), ProtectedPagesForm::showOptions(), SpecialPrefixindex::showPrefixChunk(), EmailConfirmation::showRequestForm(), SpecialSearchOld::showResults(), SpecialSearch::showResults(), UndeleteForm::showRevision(), SpecialRevisionDelete::showRevs(), UndeleteForm::showSearchForm(), SpecialVersion::softwareInformation(), UserrightsPage::switchForm(), UploadForm::uploadWarning(), wfSpecialFileDuplicateSearch(), wfSpecialLinkSearch(), wfSpecialMIMEsearch(), wfSpecialNewimages(), wfSpecialWatchlist(), SpecialVersion::wgHooks(), and WhatLinksHerePage::whatlinkshereForm().
static Xml::dateMenu | ( | $ | year, | |
$ | month | |||
) | [static] |
$year | Integer | |
$month | Integer |
Definition at line 181 of file Xml.php.
References input(), label(), monthSelector(), and wfMsg().
Referenced by SpecialContributions::getForm(), and LogEventsList::showOptions().
static Xml::element | ( | $ | element, | |
$ | attribs = null , |
|||
$ | contents = '' , |
|||
$ | allowShortTag = true | |||
) | [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.
$element | String: element name | |
$attribs | Array: Name=>value pairs. Values will be escaped. | |
$contents | String: NULL to make an open tag only; '' for a contentless closed tag (default) | |
$allowShortTag | Bool: whether '' in $contents will result in a contentless closed tag |
Definition at line 20 of file Xml.php.
References $out, and expandAttributes().
Referenced by MathRenderer::_linkToMathImage(), ImageHistoryList::beginImageHistoryList(), ProtectionForm::buildForm(), ChangeTags::buildTagFilterSelector(), XmlDumpWriter::caseSetting(), check(), TextPassDumper::clearOpenElement(), Article::delete(), PageHistory::diffButtons(), Article::doDelete(), SpecialTags::doTagRow(), elementClean(), SpecialResetpass::error(), escapeJsString(), SpecialListGroupRights::execute(), FilepathForm::execute(), SpecialExport::execute(), SpecialVersion::extensionCredits(), extensionTabLinks(), OutputPage::feedLink(), fieldset(), SpecialStatistics::formatRow(), ImageListPager::formatValue(), SpecialSearch::formHeader(), XmlDumpWriter::generator(), EditPage::getEditButtons(), ImageListPager::getForm(), DeletedContributionsPage::getForm(), SpecialContributions::getForm(), OutputPage::getHeadLinks(), Status::getItemXML(), WithoutInterwikiPage::getPageHeader(), hidden(), PageHistory::historyLine(), XmlDumpWriter::homelink(), ImageHistoryList::imageHistoryLine(), input(), label(), EditPage::livePreview(), PreferencesForm::mainPrefsForm(), UploadForm::mainUploadForm(), Linker::makeExternalImage(), SpecialSearch::makeSearchLink(), SpecialVersion::MediaWikiCredits(), SpecialAllpages::namespaceForm(), SpecialPrefixindex::namespacePrefixForm(), XmlDumpWriter::namespaces(), SpecialVersion::openExtType(), XmlDumpWriter::openPage(), XmlDumpWriter::openStream(), option(), Licenses::outputOption(), SkinTemplate::outputPage(), DjVuImage::parseFormDjvu(), SpecialSearch::powerSearchBox(), radio(), ApiFormatXml::recXmlPrint(), LoginForm::resetLoginForm(), IPUnblockForm::searchForm(), SpecialSearch::shortDialog(), UserrightsPage::showEditUserGroupsForm(), MovePageForm::showForm(), IPUnblockForm::showForm(), EmailUserForm::showForm(), FileDeleteForm::showForm(), UndeleteForm::showHistory(), ProtectionForm::showLogExtract(), UserrightsPage::showLogFragment(), MovePageForm::showLogFragment(), IPBlockForm::showLogFragment(), MergehistoryForm::showMergeForm(), ProtectedTitlesForm::showOptions(), ProtectedPagesForm::showOptions(), LogEventsList::showOptions(), SpecialSearchOld::showResults(), SpecialSearch::showResults(), UndeleteForm::showRevision(), XmlDumpWriter::sitename(), ApiFormatWddx::slowWddxPrinter(), SpecialVersion::softwareInformation(), span(), OutputPage::styleLink(), submitButton(), UserrightsPage::switchForm(), textarea(), ThumbnailImage::toHtml(), ImagePage::view(), wfAllMessagesMakeHTMLText(), wfAllMessagesMakeXml(), wfElement(), wfSpecialFileDuplicateSearch(), wfSpecialLinkSearch(), wfSpecialMIMEsearch(), SpecialVersion::wgHooks(), XmlDumpWriter::writeContributor(), XmlDumpWriter::writeLogItem(), XmlDumpWriter::writeRevision(), XmlDumpWriter::writeTimestamp(), and XmlDumpWriter::writeUpload().
static Xml::elementClean | ( | $ | element, | |
$ | attribs = array() , |
|||
$ | contents = '' | |||
) | [static] |
Format an XML element as with self::element(), but run text through the UtfNormal::cleanUp() validator first to ensure that no invalid UTF-8 is passed.
$element | String: | |
$attribs | Array: Name=>value pairs. Values will be escaped. | |
$contents | String: NULL to make an open tag only; '' for a contentless closed tag (default) |
Definition at line 67 of file Xml.php.
References UtfNormal::cleanUp(), element(), wfProfileIn(), and wfProfileOut().
Referenced by XmlDumpWriter::openPage(), wfElementClean(), XmlDumpWriter::writeContributor(), XmlDumpWriter::writeLogItem(), XmlDumpWriter::writeRevision(), and XmlDumpWriter::writeUpload().
static Xml::encodeJsVar | ( | $ | value | ) | [static] |
Encode a variable of unknown type to JavaScript.
Arrays are converted to JS arrays, objects are converted to JS associative arrays (objects). So cast your PHP associative arrays to objects before passing them to here.
Definition at line 570 of file Xml.php.
Referenced by ProtectionForm::buildCleanupScript(), and Skin::makeVariablesScript().
static Xml::escapeJsString | ( | $ | string | ) | [static] |
Returns an escaped string suitable for inclusion in a string literal for JavaScript source code.
Illegal control characters are assumed not to be present.
$string | String to escape |
Definition at line 538 of file Xml.php.
References element().
Referenced by ProtectionForm::buildCleanupScript(), Skin::generateUserJs(), QuickTemplate::jstext(), SkinTemplate::outputPage(), Linker::tocList(), ImagePage::view(), Article::view(), and wfEscapeJsString().
static Xml::escapeTagsOnly | ( | $ | in | ) | [static] |
Replace " > and < with their respective HTML entities ( ", >, <).
$in | String: text that might contain HTML tags. |
Definition at line 654 of file Xml.php.
Referenced by Parser::extensionSubstitution(), and Parser::renderPreTag().
static Xml::expandAttributes | ( | $ | attribs | ) | [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. Return null if no attributes given.
$attribs | Array of attributes for an XML element |
Definition at line 44 of file Xml.php.
References $name, $out, and Sanitizer::encodeAttribute().
Referenced by element(), Linker::makeExternalLink(), and openElement().
static Xml::fieldset | ( | $ | legend = false , |
|
$ | content = false , |
|||
$ | attribs = array() | |||
) | [static] |
Shortcut for creating fieldsets.
$legend | Legend of the fieldset. If evaluates to false, legend is not added. | |
$content | Pre-escaped content for the fieldset. If false, only open fieldset is returned. | |
$attribs | Any attributes to fieldset-element. |
Definition at line 498 of file Xml.php.
References $s, closeElement(), element(), and openElement().
Referenced by SpecialRecentChanges::doHeader(), RestrictUserForm::existingRestrictions(), SpecialNewpages::form(), WhatLinksHerePage::getFilterPanel(), SpecialListUserRestrictionsForm::getHTML(), UsersPager::getPageHeader(), CategoryPager::getStartForm(), PageHistory::history(), PreferencesForm::mainPrefsForm(), RestrictUserForm::namespaceRestrictionForm(), RestrictUserForm::pageRestrictionForm(), SpecialSearchOld::powerSearchBox(), RestrictUserForm::selectUserForm(), SpecialResetpass::showForm(), SpecialImport::showForm(), UndeleteForm::showHistory(), SpecialRevisionDelete::showImages(), SpecialRevisionDelete::showLogItems(), UndeleteForm::showSearchForm(), wfSpecialNewimages(), wfSpecialRemoveRestrictions(), wfSpecialWatchlist(), and WhatLinksHerePage::whatlinkshereForm().
static Xml::hidden | ( | $ | name, | |
$ | value, | |||
$ | attribs = array() | |||
) | [static] |
Convenience function to build an HTML hidden form field.
$name | String: name attribute for the field | |
$value | String: value for the hidden field | |
$attribs | Array: optional custom attributes |
Definition at line 407 of file Xml.php.
References $name, and element().
Referenced by PageHistory::beginHistoryList(), ProtectionForm::buildForm(), ChangeTags::buildTagFilterSelector(), Article::confirmDelete(), SpecialRecentChanges::doHeader(), FilepathForm::execute(), SpecialNewpages::form(), LogEventsList::getFilterLinks(), DeletedContributionsPage::getForm(), SpecialContributions::getForm(), SpecialListUserRestrictionsForm::getHTML(), WithoutInterwikiPage::getPageHeader(), UsersPager::getPageHeader(), CategoryPager::getStartForm(), PageHistory::history(), PreferencesForm::mainPrefsForm(), UploadForm::mainUploadForm(), SpecialBookSources::makeForm(), SpecialAllpages::namespaceForm(), SpecialPrefixindex::namespacePrefixForm(), RestrictUserForm::namespaceRestrictionForm(), ImagePage::openShowImage(), RestrictUserForm::pageRestrictionForm(), SpecialSearchOld::powerSearchBox(), SpecialSearch::powerSearchBox(), IPUnblockForm::searchForm(), RestrictUserForm::selectUserForm(), SpecialSearchOld::shortDialog(), SpecialSearch::shortDialog(), EditPage::showEditForm(), UserrightsPage::showEditUserGroupsForm(), SpecialResetpass::showForm(), MovePageForm::showForm(), IPUnblockForm::showForm(), SpecialImport::showForm(), EmailUserForm::showForm(), FileRevertForm::showForm(), FileDeleteForm::showForm(), UndeleteForm::showHistory(), MergehistoryForm::showHistory(), SpecialRevisionDelete::showImages(), SpecialRevisionDelete::showLogItems(), MergehistoryForm::showMergeForm(), WatchlistEditor::showNormalForm(), ProtectedTitlesForm::showOptions(), ProtectedPagesForm::showOptions(), LogEventsList::showOptions(), WatchlistEditor::showRawForm(), EmailConfirmation::showRequestForm(), SpecialRevisionDelete::showRevs(), UndeleteForm::showSearchForm(), UserrightsPage::switchForm(), UploadForm::uploadWarning(), wfHidden(), wfSpecialFileDuplicateSearch(), wfSpecialLinkSearch(), wfSpecialRemoveRestrictions(), wfSpecialWatchlist(), and WhatLinksHerePage::whatlinkshereForm().
static Xml::input | ( | $ | name, | |
$ | size = false , |
|||
$ | value = false , |
|||
$ | attribs = array() | |||
) | [static] |
Convenience function to build an HTML text input field.
$name | value of the name attribute | |
$size | value of the size attribute | |
$value | value of the value attribute | |
$attribs | other attributes |
Definition at line 276 of file Xml.php.
References $name, $size, and element().
Referenced by ProtectionForm::buildForm(), ChangeTags::buildTagFilterSelector(), Article::confirmDelete(), dateMenu(), SpecialNewpages::form(), SpecialRecentchangeslinked::getExtraOptions(), DeletedContributionsPage::getForm(), SpecialContributions::getForm(), UsersPager::getPageHeader(), ProtectedPagesForm::getSizeLimit(), PreferencesForm::mainPrefsForm(), SpecialAllpages::namespaceForm(), SpecialPrefixindex::namespacePrefixForm(), RestrictUserForm::namespaceRestrictionForm(), RestrictUserForm::pageRestrictionForm(), password(), SpecialSearchOld::powerSearchBox(), SpecialResetpass::pretty(), RestrictUserForm::selectUserForm(), SpecialSearchOld::shortDialog(), SpecialSearch::shortDialog(), EditPage::showEditForm(), UserrightsPage::showEditUserGroupsForm(), MovePageForm::showForm(), IPUnblockForm::showForm(), SpecialImport::showForm(), EmailUserForm::showForm(), FileDeleteForm::showForm(), UndeleteForm::showHistory(), MergehistoryForm::showHistory(), MergehistoryForm::showMergeForm(), wfInput(), and wfSpecialRemoveRestrictions().
static Xml::inputLabel | ( | $ | label, | |
$ | name, | |||
$ | id, | |||
$ | size = false , |
|||
$ | value = false , |
|||
$ | attribs = array() | |||
) | [static] |
Convenience function to build an HTML text input field with a label.
$label | text of the label | |
$name | value of the name attribute | |
$id | id of the input | |
$size | value of the size attribute | |
$value | value of the value attribute | |
$attribs | other attributes |
Definition at line 355 of file Xml.php.
References $input, $name, $size, and inputLabelSep().
Referenced by FilepathForm::execute(), SpecialExport::execute(), ImageListPager::getForm(), SpecialListUserRestrictionsForm::getHTML(), WithoutInterwikiPage::getPageHeader(), CategoryPager::getStartForm(), LogEventsList::getTitleInput(), LogEventsList::getUserInput(), PreferencesForm::mainPrefsForm(), SpecialBookSources::makeForm(), SpecialSearch::powerSearchBox(), IPUnblockForm::searchForm(), FileRevertForm::showForm(), SpecialRevisionDelete::showImages(), SpecialRevisionDelete::showLogItems(), SpecialRevisionDelete::showRevs(), UndeleteForm::showSearchForm(), UserrightsPage::switchForm(), wfInputLabel(), wfSpecialFileDuplicateSearch(), wfSpecialLinkSearch(), wfSpecialMIMEsearch(), wfSpecialNewimages(), and WhatLinksHerePage::whatlinkshereForm().
static Xml::inputLabelSep | ( | $ | label, | |
$ | name, | |||
$ | id, | |||
$ | size = false , |
|||
$ | value = false , |
|||
$ | attribs = array() | |||
) | [static] |
Same as Xml::inputLabel() but return input and label in an array.
Definition at line 363 of file Xml.php.
References $name, $size, and label().
Referenced by SpecialRecentChanges::categoryFilterForm(), and inputLabel().
static Xml::isWellFormed | ( | $ | text | ) | [static] |
Check if a string is well-formed XML.
Must include the surrounding tag.
$text | String: string to test. |
Definition at line 612 of file Xml.php.
Referenced by wfIsWellFormedXml().
static Xml::isWellFormedXmlFragment | ( | $ | text | ) | [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.
$text | String: |
Definition at line 638 of file Xml.php.
Referenced by Parser::validateSig(), and wfIsWellFormedXmlFragment().
static Xml::label | ( | $ | label, | |
$ | id | |||
) | [static] |
Convenience function to build an HTML form label.
$label | text of the label | |
$id |
Definition at line 341 of file Xml.php.
References element().
Referenced by ProtectionForm::buildForm(), checkLabel(), Article::confirmDelete(), dateMenu(), SpecialNewpages::form(), SpecialRecentchangeslinked::getExtraOptions(), DeletedContributionsPage::getForm(), SpecialContributions::getForm(), SpecialListUserRestrictionsForm::getHTML(), ProtectedTitlesForm::getLevelMenu(), ProtectedPagesForm::getLevelMenu(), ProtectedTitlesForm::getNamespaceMenu(), ProtectedPagesForm::getNamespaceMenu(), UsersPager::getPageHeader(), ProtectedPagesForm::getSizeLimit(), ProtectedPagesForm::getTypeMenu(), inputLabelSep(), languageSelector(), PreferencesForm::mainPrefsForm(), SpecialRecentChanges::namespaceFilterForm(), SpecialAllpages::namespaceForm(), SpecialPrefixindex::namespacePrefixForm(), namespaceSelector(), SpecialSearchOld::powerSearchBox(), SpecialSearch::powerSearchBox(), SpecialResetpass::pretty(), radioLabel(), UserrightsPage::showEditUserGroupsForm(), MovePageForm::showForm(), IPUnblockForm::showForm(), SpecialImport::showForm(), EmailUserForm::showForm(), IPBlockForm::showForm(), FileDeleteForm::showForm(), UndeleteForm::showHistory(), MergehistoryForm::showHistory(), MergehistoryForm::showMergeForm(), WatchlistEditor::showRawForm(), wfLabel(), wfSpecialLinkSearch(), wfSpecialWatchlist(), and WhatLinksHerePage::whatlinkshereForm().
static Xml::languageSelector | ( | $ | selected, | |
$ | customisedOnly = true | |||
) | [static] |
$selected | The language code of the selected language | |
$customisedOnly | If true only languages which have some content are listed |
Definition at line 212 of file Xml.php.
References $code, $name, $options, $wgContLanguageCode, Language::getLanguageNames(), label(), option(), tags(), and wfMsg().
Referenced by PreferencesForm::mainPrefsForm().
static Xml::listDropDown | ( | $ | name = '' , |
|
$ | list = '' , |
|||
$ | other = '' , |
|||
$ | selected = '' , |
|||
$ | class = '' , |
|||
$ | tabindex = Null | |||
) | [static] |
Build a drop-down box from a textual list.
$name | Mixed: Name and id for the drop-down | |
$class | Mixed: CSS classes for the drop-down | |
$other | Mixed: Text for the "Other reasons" option | |
$list | Mixed: Correctly formatted text to be used to generate the options | |
$selected | Mixed: Option which should be pre-selected | |
$tabindex | Mixed: Value of the tabindex attribute |
Definition at line 444 of file Xml.php.
References $name, $options, closeElement(), openElement(), and option().
Referenced by ProtectionForm::buildForm(), Article::confirmDelete(), and FileDeleteForm::showForm().
static Xml::monthSelector | ( | $ | selected = '' , |
|
$ | allmonths = null , |
|||
$ | id = 'month' | |||
) | [static] |
Create a date selector.
$selected | Mixed: the month which should be selected, default '' | |
$allmonths | String: value of a special item denoting all month. Null to not include (default) | |
$id | String: Element identifier |
Definition at line 162 of file Xml.php.
References $i, $options, $wgLang, closeElement(), openElement(), option(), and wfMsg().
Referenced by dateMenu().
static Xml::namespaceSelector | ( | $ | selected = '' , |
|
$ | all = null , |
|||
$ | element_name = 'namespace' , |
|||
$ | label = null | |||
) | [static] |
Build a drop-down box for selecting a namespace.
$selected | Mixed: Namespace which should be pre-selected | |
$all | Mixed: Value of an item denoting all namespaces, or null to omit | |
$element_name | String: value of the "name" attribute of the select tag | |
$label | String: optional label to add to the field |
Definition at line 119 of file Xml.php.
References $name, $options, $wgContLang, closeElement(), label(), openElement(), option(), and wfMsg().
Referenced by SpecialExport::execute(), SpecialNewpages::form(), DeletedContributionsPage::getForm(), SpecialContributions::getForm(), SpecialListUserRestrictionsForm::getHTML(), ProtectedTitlesForm::getNamespaceMenu(), ProtectedPagesForm::getNamespaceMenu(), HTMLnamespaceselector(), SpecialRecentChanges::namespaceFilterForm(), SpecialAllpages::namespaceForm(), SpecialPrefixindex::namespacePrefixForm(), RestrictUserForm::namespaceRestrictionForm(), SpecialImport::showForm(), wfSpecialWatchlist(), and WhatLinksHerePage::whatlinkshereForm().
static Xml::openElement | ( | $ | element, | |
$ | attribs = null | |||
) | [static] |
This opens an XML element.
$element | name of the element | |
$attribs | array of attributes, see Xml::expandAttributes() |
Definition at line 86 of file Xml.php.
References expandAttributes().
Referenced by TagNode::__construct(), PageHistory::beginHistoryList(), ImageHistoryList::beginImageHistoryList(), EditPage::blockedPage(), ProtectionForm::buildForm(), ProtectionForm::buildSelector(), Article::confirmDelete(), EditPage::displayPreviewArea(), SpecialRecentChanges::doHeader(), SpecialStatistics::execute(), SpecialListGroupRights::execute(), FilepathForm::execute(), SpecialExport::execute(), SpecialVersion::extensionCredits(), fieldset(), SpecialNewpages::form(), SpecialStatistics::formatRow(), SpecialSearch::formHeader(), SpecialStatistics::getEditStats(), ImageListPager::getForm(), DeletedContributionsPage::getForm(), SpecialContributions::getForm(), WithoutInterwikiPage::getPageHeader(), UsersPager::getPageHeader(), SpecialStatistics::getPageStats(), SpecialStatistics::getUserStats(), SpecialStatistics::getViewsStats(), UserrightsPage::groupCheckboxes(), Linker::link(), listDropDown(), WhatLinksHerePage::listItem(), WhatLinksHerePage::listStart(), PreferencesForm::mainPrefsForm(), UploadForm::mainUploadForm(), SpecialBookSources::makeForm(), monthSelector(), SpecialAllpages::namespaceForm(), SpecialPrefixindex::namespacePrefixForm(), RestrictUserForm::namespaceRestrictionForm(), namespaceSelector(), SpecialSearch::namespaceTables(), ImagePage::openShowImage(), RestrictUserForm::pageRestrictionForm(), SpecialSearchOld::powerSearchBox(), SpecialSearch::powerSearchBox(), OutputPage::readOnlyPage(), Parser::renderPreTag(), IPUnblockForm::searchForm(), SpecialSearchOld::shortDialog(), SpecialSearch::shortDialog(), EditPage::showEditForm(), UserrightsPage::showEditUserGroupsForm(), UndeleteForm::showFileConfirmationForm(), SpecialResetpass::showForm(), MovePageForm::showForm(), IPUnblockForm::showForm(), SpecialImport::showForm(), EmailUserForm::showForm(), FileRevertForm::showForm(), FileDeleteForm::showForm(), UndeleteForm::showHistory(), MergehistoryForm::showHistory(), SpecialRevisionDelete::showImages(), SpecialRevisionDelete::showLogItems(), MergehistoryForm::showMergeForm(), WatchlistEditor::showNormalForm(), ProtectedPagesForm::showOptions(), SpecialPrefixindex::showPrefixChunk(), WatchlistEditor::showRawForm(), EmailConfirmation::showRequestForm(), SpecialSearchOld::showResults(), SpecialSearch::showResults(), UndeleteForm::showRevision(), SpecialRevisionDelete::showRevs(), UndeleteForm::showSearchForm(), SpecialVersion::softwareInformation(), DelegatingContentHandler::startElement(), UserrightsPage::switchForm(), tags(), ImageGallery::toHTML(), UploadForm::uploadWarning(), wfOpenElement(), wfSpecialFileDuplicateSearch(), wfSpecialLinkSearch(), wfSpecialMIMEsearch(), wfSpecialNewimages(), wfSpecialRemoveRestrictions(), wfSpecialWatchlist(), SpecialVersion::wgHooks(), and WhatLinksHerePage::whatlinkshereForm().
static Xml::option | ( | $ | text, | |
$ | value = null , |
|||
$ | selected = false , |
|||
$ | attribs = array() | |||
) | [static] |
Convenience function to build an HTML drop-down list item.
$text | String: text for this item | |
$value | String: form submission value; if empty, use text | |
$selected | boolean: if true, will be the default selected item | |
$attribs | array: optional additional HTML attributes |
Definition at line 422 of file Xml.php.
References $text, and element().
Referenced by ProtectionForm::buildForm(), ProtectionForm::buildSelector(), ProtectedTitlesForm::getLevelMenu(), ProtectedPagesForm::getLevelMenu(), UsersPager::getPageHeader(), ProtectedPagesForm::getTypeMenu(), LogEventsList::getTypeMenu(), languageSelector(), listDropDown(), PreferencesForm::mainPrefsForm(), monthSelector(), namespaceSelector(), ImagePage::openShowImage(), and SpecialImport::showForm().
static Xml::password | ( | $ | name, | |
$ | size = false , |
|||
$ | value = false , |
|||
$ | attribs = array() | |||
) | [static] |
static Xml::radio | ( | $ | name, | |
$ | value, | |||
$ | checked = false , |
|||
$ | attribs = array() | |||
) | [static] |
Convenience function to build an HTML radio button.
$name | value of the name attribute | |
$value | value of the value attribute | |
$checked | Whether the checkbox is checked or not | |
$attribs | other attributes |
Definition at line 328 of file Xml.php.
References $name, and element().
Referenced by MergehistoryForm::formatRevisionRow(), radioLabel(), and wfRadio().
static Xml::radioLabel | ( | $ | label, | |
$ | name, | |||
$ | value, | |||
$ | id, | |||
$ | checked = false , |
|||
$ | attribs = array() | |||
) | [static] |
Convenience function to build an HTML radio button with a label.
Definition at line 384 of file Xml.php.
References $name, label(), and radio().
Referenced by SpecialContributions::getForm(), ProtectedPagesForm::getSizeLimit(), PreferencesForm::mainPrefsForm(), and wfRadioLabel().
static Xml::span | ( | $ | text, | |
$ | class, | |||
$ | attribs = array() | |||
) | [static] |
Shortcut to make a span element.
$text | content of the element, will be escaped | |
$class | class name of the span element | |
$attribs | other attributes |
Definition at line 252 of file Xml.php.
References $text, and element().
Referenced by DifferenceEngine::showDiffPage(), and wfSpan().
static Xml::submitButton | ( | $ | value, | |
$ | attribs = array() | |||
) | [static] |
Convenience function to build an HTML submit button.
$value | String: label text for the button | |
$attribs | Array: optional custom attributes |
Definition at line 396 of file Xml.php.
References element().
Referenced by ProtectionForm::buildForm(), Article::confirmDelete(), FilepathForm::execute(), SpecialExport::execute(), SpecialNewpages::form(), ImageListPager::getForm(), DeletedContributionsPage::getForm(), SpecialContributions::getForm(), SpecialListUserRestrictionsForm::getHTML(), WithoutInterwikiPage::getPageHeader(), UsersPager::getPageHeader(), CategoryPager::getStartForm(), SpecialBookSources::makeForm(), SpecialAllpages::namespaceForm(), SpecialPrefixindex::namespacePrefixForm(), ImagePage::openShowImage(), SpecialSearchOld::powerSearchBox(), SpecialSearch::powerSearchBox(), IPUnblockForm::searchForm(), SpecialSearchOld::shortDialog(), SpecialSearch::shortDialog(), UserrightsPage::showEditUserGroupsForm(), UndeleteForm::showFileConfirmationForm(), SpecialResetpass::showForm(), MovePageForm::showForm(), IPUnblockForm::showForm(), SpecialImport::showForm(), EmailUserForm::showForm(), FileRevertForm::showForm(), FileDeleteForm::showForm(), UndeleteForm::showHistory(), MergehistoryForm::showHistory(), SpecialRevisionDelete::showImages(), SpecialRevisionDelete::showLogItems(), MergehistoryForm::showMergeForm(), WatchlistEditor::showNormalForm(), ProtectedTitlesForm::showOptions(), ProtectedPagesForm::showOptions(), LogEventsList::showOptions(), WatchlistEditor::showRawForm(), EmailConfirmation::showRequestForm(), SpecialRevisionDelete::showRevs(), UndeleteForm::showSearchForm(), UserrightsPage::switchForm(), UploadForm::uploadWarning(), wfSpecialFileDuplicateSearch(), wfSpecialLinkSearch(), wfSpecialMIMEsearch(), wfSpecialNewimages(), wfSpecialWatchlist(), wfSubmitButton(), and WhatLinksHerePage::whatlinkshereForm().
static Xml::tags | ( | $ | element, | |
$ | attribs = null , |
|||
$ | contents | |||
) | [static] |
Same as Xml::element(), but does not escape contents.
Handy when the content you have is already valid xml.
$element | element name | |
$attribs | array of attributes | |
$contents | content of the element |
Definition at line 106 of file Xml.php.
References openElement().
Referenced by MathRenderer::_doRender(), EnhancedChangesList::beginRecentChangesList(), SpecialRevisionDelete::buildCheckBoxes(), ProtectionForm::buildCleanupScript(), ProtectionForm::buildForm(), ProtectionForm::buildScript(), ChangeTags::buildTagFilterSelector(), Article::confirmDelete(), SpecialRecentChanges::doHeader(), SpecialTags::doTagRow(), SpecialTags::execute(), DateFormatter::formatDate(), UndeleteForm::formatFileRow(), UndeleteForm::formatRevisionRow(), CategoryPager::formatRow(), UploadForm::getDupeWarning(), SpecialStatistics::getEditStats(), ImageListPager::getForm(), DeletedContributionsPage::getForm(), SpecialContributions::getForm(), ProtectedTitlesForm::getLevelMenu(), ProtectedPagesForm::getLevelMenu(), SpecialStatistics::getMostViewedPages(), SpecialStatistics::getPageStats(), LogEventsList::getShowHideLinks(), CategoryPager::getStartForm(), ProtectedPagesForm::getTypeMenu(), SpecialStatistics::getUserStats(), SpecialStatistics::getViewsStats(), UserrightsPage::groupCheckboxes(), PageHistory::historyLine(), languageSelector(), MediaTransformOutput::linkWrap(), WhatLinksHerePage::listItem(), EditPage::livePreview(), LogEventsList::logLine(), PreferencesForm::mainPrefsForm(), ImagePage::openShowImage(), DjVuImage::parseFormDjvu(), IPUnblockForm::searchForm(), DifferenceEngine::showDiffPage(), EditPage::showEditForm(), UserrightsPage::showEditUserGroupsForm(), MovePageForm::showForm(), IPUnblockForm::showForm(), IPBlockForm::showForm(), IPUnblockForm::showList(), LogEventsList::showOptions(), SpecialRevisionDelete::showRevs(), PreferencesForm::tableRow(), wfSpecialListUserRestrictions(), wrapClass(), and TableDiffFormatter::wrapLine().
static Xml::textarea | ( | $ | name, | |
$ | content, | |||
$ | cols = 40 , |
|||
$ | rows = 5 , |
|||
$ | attribs = array() | |||
) | [static] |
Shortcut for creating textareas.
$name | The 'name' for the textarea | |
$content | Content for the textarea | |
$cols | The number of columns for the textarea | |
$rows | The number of rows for the textarea | |
$attribs | Any other attributes for the textarea |
Definition at line 520 of file Xml.php.
References $name, $rows, and element().
Referenced by EmailUserForm::showForm(), and EditPage::showTextbox().
static Xml::wrapClass | ( | $ | text, | |
$ | class, | |||
$ | tag = 'span' , |
|||
$ | attribs = array() | |||
) | [static] |
Shortcut to make a specific element with a class attribute.
$text | content of the element, will be escaped | |
$class | class name of the span element | |
$tag | element name | |
$attribs | other attributes |
Definition at line 264 of file Xml.php.
Referenced by WhatLinksHerePage::listItem().