Moodle PHP Documentation 4.4
Moodle 4.4.1 (Build: 20240610) (db07c09afc5)
HTMLPurifier_TagTransform_Font Class Reference
Inheritance diagram for HTMLPurifier_TagTransform_Font:
HTMLPurifier_TagTransform

Public Member Functions

 transform ($tag, $config, $context)
 

Public Attributes

 $transform_to = 'span'
 @type string
 

Protected Member Functions

 prependCSS (&$attr, $css)
 Prepends CSS properties to the style attribute, creating the attribute if it doesn't exist.
 

Protected Attributes

 $_size_lookup
 @type array
 

Member Function Documentation

◆ prependCSS()

HTMLPurifier_TagTransform::prependCSS ( & $attr,
$css )
protectedinherited

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

Warning
Copied over from AttrTransform, be sure to keep in sync
Parameters
array$attrAttribute array to process (passed by reference)
string$cssCSS to prepend

◆ transform()

HTMLPurifier_TagTransform_Font::transform ( $tag,
$config,
$context )
Parameters
HTMLPurifier_Token_Tag$tag
HTMLPurifier_Config$config
HTMLPurifier_Context$context
Return values
HTMLPurifier_Token_End|string

Reimplemented from HTMLPurifier_TagTransform.

Member Data Documentation

◆ $_size_lookup

HTMLPurifier_TagTransform_Font::$_size_lookup
protected
Initial value:
= array(
'0' => 'xx-small',
'1' => 'xx-small',
'2' => 'small',
'3' => 'medium',
'4' => 'large',
'5' => 'x-large',
'6' => 'xx-large',
'7' => '300%',
'-1' => 'smaller',
'-2' => '60%',
'+1' => 'larger',
'+2' => '150%',
'+3' => '200%',
'+4' => '300%'
)

@type array


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