ILIAS
release_4-4 Revision
◀ ilDoc Overview
Main Page
Related Pages
Modules
+
Namespaces
Namespace List
+
Data Structures
Data Structures
Data Structure Index
Class Hierarchy
+
Data Fields
+
All
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
+
Variables
$
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
y
+
Files
File List
+
Globals
+
All
$
(
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
+
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
o
p
r
s
t
u
v
w
x
+
Variables
$
(
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Examples
•
All
Data Structures
Namespaces
Files
Functions
Variables
Modules
Pages
Simple.php
Go to the documentation of this file.
1
<?php
2
8
class
HTMLPurifier_TagTransform_Simple
extends
HTMLPurifier_TagTransform
9
{
10
11
protected
$style
;
12
17
public
function
__construct
(
$transform_to
,
$style
= null) {
18
$this->transform_to =
$transform_to
;
19
$this->style =
$style
;
20
}
21
22
public
function
transform
($tag, $config, $context) {
23
$new_tag = clone $tag;
24
$new_tag->name =
$this->transform_to
;
25
if
(!is_null($this->style) &&
26
($new_tag instanceof
HTMLPurifier_Token_Start
|| $new_tag instanceof
HTMLPurifier_Token_Empty
)
27
) {
28
$this->
prependCSS
($new_tag->attr, $this->style);
29
}
30
return
$new_tag;
31
}
32
33
}
34
35
// vim: et sw=4 sts=4
HTMLPurifier_TagTransform
Defines a mutation of an obsolete tag into a valid tag.
Definition:
TagTransform.php:6
HTMLPurifier_Token_Start
Concrete start token class.
Definition:
Start.php:6
HTMLPurifier_TagTransform\prependCSS
prependCSS(&$attr, $css)
Prepends CSS properties to the style attribute, creating the attribute if it doesn't exist...
Definition:
TagTransform.php:29
HTMLPurifier_TagTransform_Simple\transform
transform($tag, $config, $context)
Definition:
Simple.php:22
HTMLPurifier_TagTransform_Simple\$style
$style
Definition:
Simple.php:11
HTMLPurifier_Token_Empty
Concrete empty token class.
Definition:
Empty.php:6
HTMLPurifier_TagTransform_Simple\__construct
__construct($transform_to, $style=null)
Definition:
Simple.php:17
HTMLPurifier_TagTransform\$transform_to
$transform_to
Tag name to transform the tag to.
Definition:
TagTransform.php:12
HTMLPurifier_TagTransform_Simple
Simple transformation, just change tag name to something else, and possibly add some styling...
Definition:
Simple.php:8
Services
Html
HtmlPurifier
library
HTMLPurifier
TagTransform
Simple.php
Generated on Mon Dec 21 2020 19:01:16 for ILIAS by
1.8.13 (using
Doxyfile
)