MobileFrontend
Mobile optimised frontend for MediaWiki
|
Converts HTML into a mobile-friendly version. More...
Public Member Functions | |
__construct ( $html, Title $title, Config $config, MobileContext $context) | |
applyTransforms (array $transforms) | |
Performs various transformations to the content to make it appropriate for mobile devices. More... | |
Static Public Member Functions | |
static | canApply ( $text, $options) |
Check whether the MobileFormatter can be applied to the text of a page. More... | |
Public Attributes | |
const | STYLE_COLLAPSIBLE_SECTION_CLASS = 'collapsible-block' |
Class name for collapsible section wrappers. | |
Protected Member Functions | |
parseItemsToRemove () | |
@inheritDoc | |
Protected Attributes | |
$title | |
Converts HTML into a mobile-friendly version.
MobileFormatter::__construct | ( | $html, | |
Title | $title, | ||
Config | $config, | ||
MobileContext | $context | ||
) |
string | $html | Text to process |
Title | $title | Title to which $html belongs |
Config | $config | |
MobileContext | $context |
MobileFormatter::applyTransforms | ( | array | $transforms | ) |
Performs various transformations to the content to make it appropriate for mobile devices.
array<IMobileTransform> | $transforms lit of transforms to be sequentually applied to html DOM |
@phan-suppress-next-line PhanTypeMismatchArgumentSuperType DOMNode vs. DOMElement
|
static |
Check whether the MobileFormatter can be applied to the text of a page.
string | $text | |
array | $options | with 'maxHeadings' and 'maxImages' keys that limit the MobileFormatter to pages with less than or equal to that number of headings and images. |