HumHub Documentation (unofficial)

HTMLPurifier_AttrTransform_ImgSpace extends HTMLPurifier_AttrTransform
in package

Pre-transform that changes deprecated hspace and vspace attributes to CSS

Table of Contents

Properties

$attr  : mixed
$css  : mixed

Methods

__construct()  : mixed
confiscateAttr()  : mixed
Retrieves and removes an attribute
prependCSS()  : mixed
Prepends CSS properties to the style attribute, creating the attribute if it doesn't exist.
transform()  : array<string|int, mixed>
Abstract: makes changes to the attributes dependent on multiple values.

Properties

$attr

protected mixed $attr
Tags
type

string

$css

protected mixed $css = array('hspace' => array('left', 'right'), 'vspace' => array('top', 'bottom'))
Tags
type

array

Methods

__construct()

public __construct(string $attr) : mixed
Parameters
$attr : string

confiscateAttr()

Retrieves and removes an attribute

public confiscateAttr(array<string|int, mixed> &$attr, mixed $key) : mixed
Parameters
$attr : array<string|int, mixed>

Attribute array to process (passed by reference)

$key : mixed

Key of attribute to confiscate

prependCSS()

Prepends CSS properties to the style attribute, creating the attribute if it doesn't exist.

public prependCSS(array<string|int, mixed> &$attr, string $css) : mixed
Parameters
$attr : array<string|int, mixed>

Attribute array to process (passed by reference)

$css : string

CSS to prepend


        
On this page

Search results