Handbuch:Html.php
MediaWiki-Datei: Html.php | |
---|---|
Speicherort: | includes/Html/ |
Quellcode: | master • 1.42.3 • 1.41.4 • 1.39.10 |
Klassen: | Html |
Before 1.40.1:
MediaWiki-Datei: Html.php | |
---|---|
Speicherort: | includes/ |
Quellcode: | master • 1.42.3 • 1.41.4 • 1.39.10 |
Klassen: | Html |
Html.php enthält die Html-Klasse. Diese Klasse ist eine Sammlung von statischen Funktionen, die zwei Zwecke dienen:
- Implement any algorithms specified by HTML5, or other HTML specifications, in a convenient and self-contained way.
- 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.
Configuration options
Methoden
General methods for HTML elements and attributes
- rawElement() - Ergibt ein HTML-Element in einer Zeichenkette.
- element() - similar but escapes HTML-escapes incoming content
- openElement()
- closeElement()
- expandAttributes()
Methods for specific elements
- buttonAttributes()
- getTextInputAttributes() - Modifies a set of attributes meant for text input elements and apply a set of default attributes.
- linkButton()
- submitButton()
- input()
- check() - checkboxes
- radio() - radio buttons
- label()
- hidden()
- textarea()
- scripts:
- inlineScript()
- linkedScript()
- styles:
- inlineStyle()
- linkedStyle()
- Message boxes
- noticeBox()
- warningBox()
- etc.
- Drop-down box for selecting a namespace
- namespaceSelector()
- namespaceSelectorOptions()
- htmlHeader()
Other
- isXmlMimeType() - Determines if the given MIME type is xml.
- srcSet() - Generate a srcset attribute value.