MobileFrontend
Mobile optimised frontend for MediaWiki
Loading...
Searching...
No Matches
MobileFrontend\Transforms\Utils\HtmlStyleUtils Class Reference

Simple utility class for working with html styles as with key-value array. More...

Static Public Member Functions

static parseStyleString (string $styleAttr)
 Parse html styles string into kev-value array.
 
static formStyleString (array $styles)
 Forms style's string from kev-value array.
 
static filterAllowedStyles (array $styles, array $allowedStyles, array $additional)
 Filters style key-value array by list of allowed styles, appending them by list of additional styles.
 

Detailed Description

Simple utility class for working with html styles as with key-value array.

Member Function Documentation

◆ filterAllowedStyles()

static MobileFrontend\Transforms\Utils\HtmlStyleUtils::filterAllowedStyles ( array $styles,
array $allowedStyles,
array $additional )
static

Filters style key-value array by list of allowed styles, appending them by list of additional styles.

Parameters
array$styleskey-value array of html styles
string[]$allowedStyleslist of allowed styles
array$additionalkey-value array of additional styles should be added in front of list
Returns
array

◆ formStyleString()

static MobileFrontend\Transforms\Utils\HtmlStyleUtils::formStyleString ( array $styles)
static

Forms style's string from kev-value array.

Parameters
array$styles
Returns
string

◆ parseStyleString()

static MobileFrontend\Transforms\Utils\HtmlStyleUtils::parseStyleString ( string $styleAttr)
static

Parse html styles string into kev-value array.

Parameters
string$styleAttrElement or document to rewrite images in.
Returns
array

The documentation for this class was generated from the following file: