MediaWiki
1.28.0
|
This class is a collection of static functions that serve two purposes: More...
Static Public Member Functions | |
static | buttonAttributes (array $attrs, array $modifiers=[]) |
Modifies a set of attributes meant for button elements and apply a set of default attributes when $wgUseMediaWikiUIEverywhere enabled. More... | |
static | check ($name, $checked=false, array $attribs=[]) |
Convenience function to produce a checkbox (input element with type=checkbox) More... | |
static | closeElement ($element) |
Returns "</$element>". More... | |
static | element ($element, $attribs=[], $contents= '') |
Identical to rawElement(), but HTML-escapes $contents (like Xml::element()). More... | |
static | expandAttributes (array $attribs) |
Given an associative array of element attributes, generate a string to stick after the element name in HTML output. More... | |
static | getTextInputAttributes (array $attrs) |
Modifies a set of attributes meant for text input elements and apply a set of default attributes. More... | |
static | hidden ($name, $value, array $attribs=[]) |
Convenience function to produce an input element with type=hidden. More... | |
static | htmlHeader (array $attribs=[]) |
Constructs the opening html-tag with necessary doctypes depending on global variables. More... | |
static | infoBox ($text, $icon, $alt, $class= '') |
Get HTML for an info box with an icon. More... | |
static | inlineScript ($contents) |
Output a "<script>" tag with the given contents. More... | |
static | inlineStyle ($contents, $media= 'all') |
Output a "<style>" tag with the given contents for the given media type (if any). More... | |
static | input ($name, $value= '', $type= 'text', array $attribs=[]) |
Convenience function to produce an "<input>" element. More... | |
static | isXmlMimeType ($mimetype) |
Determines if the given MIME type is xml. More... | |
static | label ($label, $id, array $attribs=[]) |
Convenience function for generating a label for inputs. More... | |
static | linkButton ($contents, array $attrs, array $modifiers=[]) |
Returns an HTML link element in a string styled as a button (when $wgUseMediaWikiUIEverywhere is enabled). More... | |
static | linkedScript ($url) |
Output a "<script>" tag linking to the given URL, e.g., "<script src=foo.js></script>". More... | |
static | linkedStyle ($url, $media= 'all') |
Output a "<link rel=stylesheet>" linking to the given URL for the given media type (if any). More... | |
static | namespaceSelector (array $params=[], array $selectAttribs=[]) |
Build a drop-down box for selecting a namespace. More... | |
static | namespaceSelectorOptions (array $params=[]) |
Helper for Html::namespaceSelector(). More... | |
static | openElement ($element, $attribs=[]) |
Identical to rawElement(), but has no third parameter and omits the end tag (and the self-closing '/' in XML mode for empty elements). More... | |
static | radio ($name, $checked=false, array $attribs=[]) |
Convenience function to produce a radio button (input element with type=radio) More... | |
static | rawElement ($element, $attribs=[], $contents= '') |
Returns an HTML element in a string. More... | |
static | srcSet (array $urls) |
Generate a srcset attribute value. More... | |
static | submitButton ($contents, array $attrs, array $modifiers=[]) |
Returns an HTML link element in a string styled as a button (when $wgUseMediaWikiUIEverywhere is enabled). More... | |
static | textarea ($name, $value= '', array $attribs=[]) |
Convenience function to produce a <textarea> element. More... | |
Static Private Member Functions | |
static | dropDefaults ($element, array $attribs) |
Given an element name and an associative array of element attributes, return an array that is functionally identical to the input array, but possibly smaller. More... | |
Static Private Attributes | |
static | $boolAttribs |
static | $voidElements |
This class is a collection of static functions that serve two purposes:
1) Implement any algorithms specified by HTML5, or other HTML specifications, in a convenient and self-contained way.
2) Allow HTML elements to be conveniently and safely generated, like the current Xml class but a) less confused (Xml supports HTML-specific things, but only sometimes!) and b) not necessarily confined to XML-compatible output.
There are two important configuration options this class uses:
$wgMimeType: If this is set to an xml MIME type then output should be valid XHTML5.
This class is meant to be confined to utility functions that are called from trusted code paths. It does not do enforcement of policy like not allowing elements.
Modifies a set of attributes meant for button elements and apply a set of default attributes when $wgUseMediaWikiUIEverywhere enabled.
array | $attrs | HTML attributes in an associative array |
string[] | $modifiers classes to add to the button |
Definition at line 109 of file Html.php.
References $wgUseMediaWikiUIEverywhere, and global.
Referenced by PreferencesForm\getButtons(), and EditPage\getCancelLink().
Convenience function to produce a checkbox (input element with type=checkbox)
string | $name | Name attribute |
bool | $checked | Whether the checkbox is checked or not |
array | $attribs | Array of additional attributes |
Definition at line 696 of file Html.php.
References $attribs, $name, and $value.
Referenced by HtmlTest\testWrapperCheck().
|
static |
Returns "</$element>".
string | $element | Name of the element, e.g., 'a' |
Definition at line 305 of file Html.php.
Referenced by CategoryViewer\columnList(), Article\confirmDelete(), SpecialCategories\execute(), SpecialListGrants\execute(), SpecialTrackingCategories\execute(), TablePager\formatRow(), SpecialLog\getActionButtons(), SpecialChangeCredentials\getAuthForm(), EditPage\getCheckboxes(), OracleInstaller\getConnectForm(), PostgresInstaller\getConnectForm(), MysqlInstaller\getConnectForm(), MssqlInstaller\getConnectForm(), SpecialVersion\getCreditsForExtension(), SpecialVersion\getEntryPointInfo(), SpecialVersion\getExternalLibraries(), ApiHelp\getHelpInternal(), DatabaseInstaller\getInstallUserBox(), TablePager\getNavigationBar(), HTMLMultiSelectField\getOneCheckbox(), HTMLCheckMatrix\getOneCheckbox(), EditPage\getPreviewLimitReport(), MssqlInstaller\getSettingsForm(), DatabaseInstaller\getWebUserBox(), SpecialVersion\getWgHooks(), OutputPage\headElement(), ImagePage\imageLinks(), ChangesListSpecialPage\makeLegend(), ApiMain\modifyHelp(), SpecialPasswordReset\onSuccess(), SpecialVersion\openExtType(), WebInstallerOutput\outputFooter(), SpecialSpecialpages\outputPageList(), MediaStatisticsPage\outputTableEnd(), SpecialAllPages\showChunk(), SpecialExpandTemplates\showHtmlPreview(), SpecialPrefixindex\showPrefixChunk(), SpecialChangeCredentials\showSubpageList(), UserrightsPage\switchForm(), SpecialEmailUser\userForm(), and wfHtmlValidationHandler().
|
staticprivate |
Given an element name and an associative array of element attributes, return an array that is functionally identical to the input array, but possibly smaller.
In particular, attributes might be stripped if they are given their default values.
This method is not guaranteed to remove all redundant attributes, only some common ones and some others selected arbitrarily at random. It only guarantees that the output array should be functionally identical to the input array (currently per the HTML 5 draft as of 2009-09-06).
string | $element | Name of the element, e.g., 'a' |
array | $attribs | Associative array of attributes, e.g., [ 'href' => 'http://www.mediawiki.org/' ]. See expandAttributes() for further documentation. |
|
static |
Identical to rawElement(), but HTML-escapes $contents (like Xml::element()).
string | $element | |
array | $attribs | |
string | $contents |
Definition at line 229 of file Html.php.
References $attribs.
Referenced by OutputPage\addElement(), JsonContent\arrayTable(), OutputPage\buildExemptModules(), ListToggle\checkboxLink(), ApiFormatBase\closePrinter(), Article\confirmDelete(), MWDebug\deprecated(), WebInstallerDBConnect\execute(), SpecialPreferences\execute(), SpecialListGrants\execute(), SpecialVersion\execute(), UserrightsPage\execute(), OutputPage\feedLink(), ChangesList\flag(), Parser\formatHeadings(), PageQueryPage\formatResult(), FewestrevisionsPage\formatResult(), MostlinkedCategoriesPage\formatResult(), UnwatchedpagesPage\formatResult(), MostcategoriesPage\formatResult(), ShortPagesPage\formatResult(), MostinterwikisPage\formatResult(), MostlinkedTemplatesPage\formatResult(), MostlinkedPage\formatResult(), SpecialPagesWithProp\formatResult(), SpecialProtectedtitles\formatRow(), SpecialNewpages\formatRow(), ProtectedPagesPager\formatValue(), SpecialLog\getActionButtons(), SpecialChangeCredentials\getAuthForm(), VFormHTMLForm\getButtons(), HTMLForm\getButtons(), WebInstallerOptions\getCCChooser(), WebInstallerOptions\getCCDoneBox(), OracleInstaller\getConnectForm(), PostgresInstaller\getConnectForm(), MysqlInstaller\getConnectForm(), MssqlInstaller\getConnectForm(), SpecialVersion\getCreditsForExtension(), UploadForm\getDescriptionSection(), FeedUtils\getDiffLink(), TablePager\getEmptyBody(), SpecialVersion\getEntryPointInfo(), SpecialVersion\getExternalLibraries(), LoginSignupSpecialPage\getFieldDefinitions(), OutputPage\getHeadLinksArray(), ApiHelp\getHelpInternal(), HTMLButtonField\getInputHTML(), HTMLCheckMatrix\getInputHTML(), DatabaseInstaller\getInstallUserBox(), UploadSourceField\getLabelHtml(), HTMLCheckMatrix\getOneCheckbox(), WebInstaller\getPageListItem(), SpecialVersion\getParserTags(), HistoryPager\getRevisionButton(), MssqlInstaller\getSettingsForm(), TablePager\getStartBody(), SpecialVersion\getVersionLinkedGit(), DatabaseInstaller\getWebUserBox(), SpecialVersion\getWgHooks(), OutputPage\headElement(), Linker\makeExternalImage(), Skin\makeFooterIcon(), InfoAction\makeHeader(), ChangesListSpecialPage\makeLegend(), SpecialBookSources\makeListItem(), ResourceLoaderClientHtml\makeLoad(), BaseTemplate\makeSearchButton(), BaseTemplate\makeSearchInput(), ApiMain\modifyHelp(), Language\numLink(), JsonContent\objectRow(), JsonContent\objectTable(), InfoAction\onView(), SpecialVersion\openExtType(), Xml\option(), MediaStatisticsPage\outputMediaType(), SpecialListGroupRights\outputNamespaceProtectionInfo(), MediaStatisticsPage\outputTableRow(), InfoAction\pageInfo(), ImportReporter\reportNotice(), MWExceptionRenderer\reportOutageHTML(), JsonContent\rootValueTable(), SpecialSearch\searchProfileTabs(), ChangesList\showCharacterDifference(), SpecialAllPages\showChunk(), DifferenceEngine\showDiffPage(), SpecialImport\showForm(), SpecialUndelete\showHistory(), SpecialBlockList\showList(), SpecialUndelete\showList(), SpecialPrefixindex\showPrefixChunk(), EditPage\showStandardInputs(), SpecialChangeCredentials\showSubpageList(), SpecialUploadStash\showUploads(), WebInstaller\startPageWrapper(), Xml\submitButton(), HtmlTest\testDropDefaults(), HtmlTest\testElementBasics(), HtmlTest\testHtmlElementAcceptsNewHtml5TypesInHtml5Mode(), JsonContent\valueCell(), and wfHtmlValidationHandler().
|
static |
Given an associative array of element attributes, generate a string to stick after the element name in HTML output.
Like [ 'href' => 'http://www.mediawiki.org/' ] becomes something like ' href="http://www.mediawiki.org"'. Again, this is like Xml::expandAttributes(), but it implements some HTML-specific logic.
Attributes that can contain space-separated lists ('class', 'accesskey' and 'rel') array values are allowed as well, which will automagically be normalized and converted to a space-separated string. In addition to a numerical array, the attribute value may also be an associative array. See the example below for how that works.
array | $attribs | Associative array of attributes, e.g., [ 'href' => 'http://www.mediawiki.org/' ]. Values will be HTML-escaped. A value of false means to omit the attribute. For boolean attributes, you can omit the key, e.g., [ 'checked' ] instead of [ 'checked' => 'checked' ] or such. |
MWException | If an attribute that doesn't allow lists is set to an array |
Definition at line 470 of file Html.php.
References $ret, $value, and as.
Referenced by LanguageConverter\autoConvert(), HtmlTest\testExpandAttributes_ArrayOnNonListValueAttribute_ThrowsException(), HtmlTest\testExpandAttributesForBooleans(), HtmlTest\testExpandAttributesForNumbers(), HtmlTest\testExpandAttributesForObjects(), HtmlTest\testExpandAttributesListValueAttributes(), HtmlTest\testExpandAttributesSkipsNullAndFalse(), HtmlTest\testExpandAttributesSpaceSeparatedAttributesWithBoolean(), HtmlTest\testExpandAttributesVariousExpansions(), HtmlTest\testFormValidationBlacklist(), and HtmlTest\testValueIsAuthoritativeInSpaceSeparatedAttributesArrays().
|
static |
Modifies a set of attributes meant for text input elements and apply a set of default attributes.
Removes size attribute when $wgUseMediaWikiUIEverywhere enabled.
array | $attrs | An attribute array. |
Definition at line 136 of file Html.php.
References $wgUseMediaWikiUIEverywhere, and global.
Referenced by Xml\input(), and Xml\textarea().
|
static |
Convenience function to produce an input element with type=hidden.
string | $name | Name attribute |
string | $value | Value attribute |
array | $attribs | Associative array of miscellaneous extra attributes, passed to Html::element() |
Definition at line 758 of file Html.php.
References $attribs, $name, and $value.
Referenced by SpecialEditTags\buildCheckBoxes(), AllMessagesTablePager\buildForm(), ProtectionForm\buildForm(), Article\confirmDelete(), Preferences\datetimePreferences(), SpecialRecentChanges\doHeader(), SpecialWatchlist\doHeader(), ImagePage\doRenderLangOpt(), WebInstallerPage\endForm(), WebInstallerLanguage\execute(), WebInstallerOptions\execute(), SpecialNewpages\form(), SpecialLog\getActionButtons(), LogEventsList\getFilterLinks(), TablePager\getHiddenFields(), HTMLForm\getHiddenFields(), HTMLFormFieldCloner\getInputHTMLForKey(), UsersPager\getPageHeader(), HistoryPager\getStartBody(), CategoryPager\getStartForm(), SpecialPrefixindex\namespacePrefixForm(), HistoryAction\onView(), ImagePage\openShowImage(), SpecialSearch\powerSearchBox(), SpecialWatchlist\setTopText(), SpecialSearch\shortDialog(), EditPage\showEditForm(), UserrightsPage\showEditUserGroupsForm(), MovePageForm\showForm(), SpecialEditTags\showForm(), FileDeleteForm\showForm(), SpecialImport\showForm(), SpecialRevisionDelete\showForm(), EditPage\showFormAfterText(), EditPage\showFormBeforeText(), SpecialMergeHistory\showHistory(), SpecialUndelete\showHistory(), SpecialMergeHistory\showMergeForm(), LogEventsList\showOptions(), SpecialProtectedpages\showOptions(), SpecialProtectedtitles\showOptions(), SpecialUndelete\showSearchForm(), UserrightsPage\switchForm(), SpecialEmailUser\userForm(), and SpecialWhatLinksHere\whatlinkshereForm().
|
static |
Constructs the opening html-tag with necessary doctypes depending on global variables.
array | $attribs | Associative array of miscellaneous extra attributes, passed to Html::element() of html tag. |
Definition at line 919 of file Html.php.
References $attribs, $ret, $tag, $wgHtml5Version, $wgMimeType, $wgXhtmlNamespaces, as, and global.
Referenced by OutputPage\headElement(), WebInstallerOutput\outputHeader(), WebInstallerOutput\outputShortHeader(), and wfHtmlValidationHandler().
|
static |
Get HTML for an info box with an icon.
string | $text | Wikitext, get this with wfMessage()->plain() |
string | $icon | Path to icon file (used as 'src' attribute) |
string | $alt | Alternate text for the icon |
string | $class | Additional class name to add to the wrapper div |
Definition at line 976 of file Html.php.
References $s.
Referenced by WebInstaller\getInfoBox().
|
static |
Output a "<script>" tag with the given contents.
string | $contents | JavaScript |
Definition at line 595 of file Html.php.
Referenced by OutputPage\addInlineScript(), and ResourceLoaderClientHtml\getHeadHtml().
|
static |
Output a "<style>" tag with the given contents for the given media type (if any).
TODO: do some useful escaping as well, like if $contents contains literal "</style>" (admittedly unlikely).
string | $contents | CSS |
string | $media | A media type string, like 'screen' |
Definition at line 627 of file Html.php.
Referenced by OutputPage\addInlineStyle(), OutputPage\buildExemptModules(), ResourceLoaderClientHtml\makeLoad(), and wfHtmlValidationHandler().
Convenience function to produce an "<input>" element.
This supports the new HTML5 input types and attributes.
string | $name | Name attribute |
string | $value | Value attribute |
string | $type | Type attribute |
array | $attribs | Associative array of miscellaneous extra attributes, passed to Html::element() |
Definition at line 675 of file Html.php.
References $attribs, $name, $type, and $value.
Referenced by Article\confirmDelete(), Xml\dateMenu(), HTMLSelectOrOtherField\getInputHTML(), HTMLSelectAndOtherField\getInputHTML(), HTMLTextField\getInputHTML(), HTMLFormFieldWithButton\getInputHTML(), UsersPager\getPageHeader(), EditPage\getSummaryInput(), SpecialImport\showForm(), HtmlTest\testWrapperInput(), and SpecialEmailUser\userForm().
|
static |
Determines if the given MIME type is xml.
string | $mimetype | MIME type |
Definition at line 958 of file Html.php.
Referenced by OutputPage\headElement(), and HtmlTest\testXmlMimeType().
|
static |
Convenience function for generating a label for inputs.
string | $label | Contents of the label |
string | $id | ID of the element being labeled |
array | $attribs | Additional attributes |
Definition at line 742 of file Html.php.
References $attribs.
Referenced by Article\confirmDelete(), HtmlTest\testWrapperLabel(), and SpecialEmailUser\userForm().
Returns an HTML link element in a string styled as a button (when $wgUseMediaWikiUIEverywhere is enabled).
string | $contents | The raw HTML contents of the element: not escaped! |
array | $attrs | Associative array of attributes, e.g., [ 'href' => 'http://www.mediawiki.org/' ]. See expandAttributes() for further documentation. |
string[] | $modifiers classes to add to the button |
Definition at line 165 of file Html.php.
Referenced by EditPage\showStandardInputs().
|
static |
Output a "<script>" tag linking to the given URL, e.g., "<script src=foo.js></script>".
string | $url |
Definition at line 612 of file Html.php.
Referenced by OutputPage\addScriptFile(), WebInstallerOutput\getJQuery(), WebInstallerOutput\outputHeader(), WebInstallerOutput\outputShortHeader(), and SpecialJavaScriptTest\plainQUnit().
|
static |
Output a "<link rel=stylesheet>" linking to the given URL for the given media type (if any).
string | $url | |
string | $media | A media type string, like 'screen' |
Definition at line 656 of file Html.php.
Referenced by WebInstallerOutput\getCssUrl(), ResourceLoaderClientHtml\makeLoad(), and OutputPage\styleLink().
Build a drop-down box for selecting a namespace.
array | $params | Params to set.
|
array | $selectAttribs | HTML attributes for the generated select element.
|
Definition at line 846 of file Html.php.
References $options, $params, $ret, and as.
Referenced by SpecialWatchlist\doHeader(), HTMLSelectNamespace\getInputHTML(), SpecialImport\getMappingFormPart(), SpecialProtectedpages\getNamespaceMenu(), SpecialProtectedtitles\getNamespaceMenu(), SpecialRecentChanges\namespaceFilterForm(), SpecialPrefixindex\namespacePrefixForm(), HtmlTest\testCanDisableANamespaces(), HtmlTest\testCanFilterOutNamespaces(), HtmlTest\testNamespaceSelector(), and SpecialWhatLinksHere\whatlinkshereForm().
|
static |
Helper for Html::namespaceSelector().
array | $params | See Html::namespaceSelector() |
Definition at line 794 of file Html.php.
References $options, $params, $wgContLang, as, global, NS_MAIN, and wfMessage().
Referenced by MediaWiki\Widget\NamespaceInputWidget\getNamespaceDropdownOptions().
|
static |
Identical to rawElement(), but has no third parameter and omits the end tag (and the self-closing '/' in XML mode for empty elements).
string | $element | |
array | $attribs |
Definition at line 247 of file Html.php.
References $attribs, and array().
Referenced by DifferenceEngine\addHeader(), CategoryViewer\columnList(), Article\confirmDelete(), WebInstallerDBConnect\execute(), SpecialCategories\execute(), SpecialListGrants\execute(), SpecialTrackingCategories\execute(), TablePager\formatRow(), SpecialLog\getActionButtons(), SpecialChangeCredentials\getAuthForm(), EditPage\getCheckboxes(), OracleInstaller\getConnectForm(), PostgresInstaller\getConnectForm(), MysqlInstaller\getConnectForm(), MssqlInstaller\getConnectForm(), SpecialVersion\getCreditsForExtension(), SpecialVersion\getEntryPointInfo(), SpecialVersion\getExternalLibraries(), ApiHelp\getHelpInternal(), CategoryViewer\getHTML(), DatabaseInstaller\getInstallUserBox(), TablePager\getNavigationBar(), HTMLMultiSelectField\getOneCheckbox(), HTMLCheckMatrix\getOneCheckbox(), EditPage\getPreviewLimitReport(), MssqlInstaller\getSettingsForm(), TablePager\getStartBody(), HistoryPager\getStartBody(), DatabaseInstaller\getWebUserBox(), SpecialVersion\getWgHooks(), OutputPage\headElement(), ImagePage\imageLinks(), ChangesListSpecialPage\makeLegend(), ApiMain\modifyHelp(), SpecialPasswordReset\onSuccess(), SpecialVersion\openExtType(), WebInstallerOutput\outputHeader(), SpecialSpecialpages\outputPageList(), MediaStatisticsPage\outputTableStart(), EnhancedChangesList\recentChangesBlockLine(), SpecialAllPages\showChunk(), EditPage\showEditForm(), SpecialExpandTemplates\showHtmlPreview(), SpecialPrefixindex\showPrefixChunk(), SpecialChangeCredentials\showSubpageList(), WebInstallerPage\startForm(), UserrightsPage\switchForm(), SpecialEmailUser\userForm(), and wfHtmlValidationHandler().
Convenience function to produce a radio button (input element with type=radio)
string | $name | Name attribute |
bool | $checked | Whether the radio button is checked or not |
array | $attribs | Array of additional attributes |
Definition at line 719 of file Html.php.
References $attribs, $name, and $value.
Referenced by HtmlTest\testWrapperRadio().
|
static |
Returns an HTML element in a string.
The major advantage here over manually typing out the HTML is that it will escape all attribute values.
This is quite similar to Xml::tags(), but it implements some useful HTML-specific logic. For instance, there is no $allowShortTag parameter: the closing tag is magically omitted if $element has an empty content model.
string | $element | The element's name, e.g., 'a' |
array | $attribs | Associative array of attributes, e.g., [ 'href' => 'http://www.mediawiki.org/' ]. See expandAttributes() for further documentation. |
string | $contents | The raw HTML contents of the element: not escaped! |
Definition at line 209 of file Html.php.
References $attribs.
Referenced by OutputPage\addHelpLink(), InfoAction\addRow(), InfoAction\addTable(), SpecialBlock\alterForm(), JsonContent\arrayRow(), JsonContent\arrayTable(), MediaWiki\Linker\LinkRenderer\buildAElement(), ChangeTags\buildTagFilterSelector(), SpecialEditWatchlist\buildTools(), ApiFormatBase\closePrinter(), MWDebug\deprecated(), EditPage\displayPreviewArea(), ImagePage\doRenderLangOpt(), WebInstaller\downloadLinkHook(), SpecialApiHelp\execute(), SpecialPreferences\execute(), SpecialListGrants\execute(), SpecialListGroupRights\execute(), SpecialListUsers\execute(), SpecialActiveUsers\execute(), UserrightsPage\execute(), FormatMetadata\flattenArrayReal(), SpecialNewpages\form(), TemplatesOnThisPageFormatter\format(), DateFormatter\formatDate(), HTMLFormField\formatErrors(), HTMLForm\formatErrors(), CategoryViewer\formatList(), HTMLMultiSelectField\formatOptions(), HTMLRadioField\formatOptions(), XmlSelect\formatOptions(), DeletedContribsPager\formatRevisionRow(), SpecialMergeHistory\formatRevisionRow(), SpecialProtectedtitles\formatRow(), CategoryPager\formatRow(), SpecialStatistics\formatRow(), ActiveUsersPager\formatRow(), UsersPager\formatRow(), TablePager\formatRow(), DeletedContribsPager\formatRow(), SpecialNewpages\formatRow(), ContribsPager\formatRow(), HTMLForm\formatSection(), BlockListPager\formatValue(), ProtectedPagesPager\formatValue(), OOUIHTMLForm\getButtons(), VFormHTMLForm\getButtons(), HTMLForm\getButtons(), Skin\getCachedNotice(), Skin\getCategories(), SpecialVersion\getCreditsForExtension(), SpecialSearch\getDidYouMeanHtml(), SpecialSearch\getDidYouMeanRewrittenHtml(), HTMLFormField\getDiv(), Title\getEditNotices(), TablePager\getEmptyBody(), SpecialVersion\getEntryPointInfo(), HTMLForm\getErrorsOrWarnings(), SpecialVersion\getExternalLibraries(), LoginSignupSpecialPage\getFieldDefinitions(), ApiHelp\getHelpInternal(), HTMLFormField\getHelpTextHtmlDiv(), HTMLFormField\getHelpTextHtmlTable(), ListToggle\getHTML(), XmlSelect\getHTML(), BaseTemplate\getIndicators(), HTMLCheckField\getInputHTML(), HTMLButtonField\getInputHTML(), HTMLCheckMatrix\getInputHTML(), Licenses\getInputHTML(), HTMLFormFieldCloner\getInputHTML(), HTMLFormFieldCloner\getInputHTMLForKey(), HTMLFormField\getLabelHtml(), UploadSourceField\getLabelHtml(), TablePager\getLimitForm(), RevDelFileItem\getLink(), SpecialProtectedpages\getNamespaceMenu(), TablePager\getNavigationBar(), LoginSignupSpecialPage\getPageHtml(), SpecialVersion\getParserFunctionHooks(), SpecialVersion\getParserTags(), EditPage\getPreviewLimitReport(), EditPage\getPreviewText(), Block\getRedactedName(), LogFormatter\getRestrictedElement(), DifferenceEngine\getRevisionHeader(), TablePager\getStartBody(), MediaStatisticsPage\getTableHeaderRow(), HTMLCheckMatrix\getTableRow(), HTMLFormField\getTableRow(), HistoryPager\historyLine(), ImagePage\imageLinks(), LogEventsList\logLine(), Linker\makeExternalLink(), Skin\makeFooterIcon(), InfoAction\makeHeader(), ChangesListSpecialPage\makeLegend(), BaseTemplate\makeLink(), SpecialBookSources\makeListItem(), BaseTemplate\makeListItem(), ResourceLoaderClientHtml\makeLoad(), Linker\makeMediaLinkFile(), BaseTemplate\makeSearchButton(), ImagePage\makeSizeLink(), EditPage\makeTemplatesOnThisPageList(), Linker\makeThumbLink2(), ApiMain\modifyHelp(), JsonContent\objectRow(), JsonContent\objectTable(), SpecialPasswordReset\onSuccess(), CreditsAction\onView(), SpecialVersion\openExtType(), ImagePage\openShowImage(), SpecialListGroupRights\outputNamespaceProtectionInfo(), SpecialSpecialpages\outputPageList(), MediaStatisticsPage\outputTableRow(), InfoAction\pageInfo(), SpecialBlock\postText(), CoreTagHooks\pre(), SkinTemplate\prepareQuickTemplate(), SpecialBlock\preText(), JsonContent\rootValueTable(), SpecialNewFiles\setTopText(), SpecialRecentChanges\setTopText(), SpecialAllPages\showChunk(), DifferenceEngine\showDiffPage(), EditPage\showEditForm(), OutputPage\showLagWarning(), SpecialBlockList\showList(), LogEventsList\showLogExtract(), SpecialPrefixindex\showPrefixChunk(), SpecialUndelete\showSearchForm(), SpecialChangeCredentials\showSubpageList(), SpecialUploadStash\showUploads(), LogFormatter\styleRestricedElement(), SpecialEmailUser\userForm(), JsonContent\valueCell(), wfHtmlValidationHandler(), ApiHelp\wrap(), VFormHTMLForm\wrapForm(), HTMLForm\wrapForm(), and SkinTemplate\wrapHTML().
|
static |
Generate a srcset attribute value.
Generates a srcset attribute value from an array mapping pixel densities to URLs. A trailing 'x' in pixel density values is optional.
string[] | $urls |
Definition at line 1023 of file Html.php.
Referenced by HtmlTest\testSrcSet(), and ThumbnailImage\toHtml().
Returns an HTML link element in a string styled as a button (when $wgUseMediaWikiUIEverywhere is enabled).
string | $contents | The raw HTML contents of the element: not escaped! |
array | $attrs | Associative array of attributes, e.g., [ 'href' => 'http://www.mediawiki.org/' ]. See expandAttributes() for further documentation. |
string[] | $modifiers classes to add to the button |
Definition at line 185 of file Html.php.
Referenced by EditPage\getEditButtons(), CategoryPager\getStartForm(), HistoryAction\onView(), HistoryPager\submitButton(), and SpecialEmailUser\userForm().
|
static |
Convenience function to produce a <textarea> element.
This supports leaving out the cols= and rows= which Xml requires and are required by HTML4/XHTML but not required by HTML5.
string | $name | Name attribute |
string | $value | Value attribute |
array | $attribs | Associative array of miscellaneous extra attributes, passed to Html::element() |
Definition at line 774 of file Html.php.
References $attribs, $name, and $value.
Referenced by HTMLTextAreaField\getInputHTML(), and EditPage\showTextbox().
|
staticprivate |
|
staticprivate |