aboutsummaryrefslogtreecommitdiffhomepage
path: root/inc/3rdparty/htmlpurifier/HTMLPurifier/Printer/CSSDefinition.php
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2014-02-21 15:57:10 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2014-02-21 15:57:10 +0100
commit99679d06884120c57f43b44e55e03595f1f87bed (patch)
treea3f2a1aa1afdaeca1386d0c6e8a75344fd2241fb /inc/3rdparty/htmlpurifier/HTMLPurifier/Printer/CSSDefinition.php
parent655214ab30ee84884dc408488b85586f36263fcb (diff)
parentd3b47e94705e17b3ba3529cbb1dc6efe69c5d2b7 (diff)
downloadwallabag-1.5.2.tar.gz
wallabag-1.5.2.tar.zst
wallabag-1.5.2.zip
Merge pull request #481 from wallabag/dev1.5.2
1.5.2
Diffstat (limited to 'inc/3rdparty/htmlpurifier/HTMLPurifier/Printer/CSSDefinition.php')
-rw-r--r--inc/3rdparty/htmlpurifier/HTMLPurifier/Printer/CSSDefinition.php44
1 files changed, 44 insertions, 0 deletions
diff --git a/inc/3rdparty/htmlpurifier/HTMLPurifier/Printer/CSSDefinition.php b/inc/3rdparty/htmlpurifier/HTMLPurifier/Printer/CSSDefinition.php
new file mode 100644
index 00000000..afc8c18a
--- /dev/null
+++ b/inc/3rdparty/htmlpurifier/HTMLPurifier/Printer/CSSDefinition.php
@@ -0,0 +1,44 @@
1<?php
2
3class HTMLPurifier_Printer_CSSDefinition extends HTMLPurifier_Printer
4{
5 /**
6 * @type HTMLPurifier_CSSDefinition
7 */
8 protected $def;
9
10 /**
11 * @param HTMLPurifier_Config $config
12 * @return string
13 */
14 public function render($config)
15 {
16 $this->def = $config->getCSSDefinition();
17 $ret = '';
18
19 $ret .= $this->start('div', array('class' => 'HTMLPurifier_Printer'));
20 $ret .= $this->start('table');
21
22 $ret .= $this->element('caption', 'Properties ($info)');
23
24 $ret .= $this->start('thead');
25 $ret .= $this->start('tr');
26 $ret .= $this->element('th', 'Property', array('class' => 'heavy'));
27 $ret .= $this->element('th', 'Definition', array('class' => 'heavy', 'style' => 'width:auto;'));
28 $ret .= $this->end('tr');
29 $ret .= $this->end('thead');
30
31 ksort($this->def->info);
32 foreach ($this->def->info as $property => $obj) {
33 $name = $this->getClass($obj, 'AttrDef_');
34 $ret .= $this->row($property, $name);
35 }
36
37 $ret .= $this->end('table');
38 $ret .= $this->end('div');
39
40 return $ret;
41 }
42}
43
44// vim: et sw=4 sts=4