~fusonic/chive/1.1

« back to all changes in this revision

Viewing changes to yii/vendors/htmlpurifier/standalone/HTMLPurifier/Printer/CSSDefinition.php

  • Committer: Matthias Burtscher
  • Date: 2010-02-12 09:12:35 UTC
  • Revision ID: matthias.burtscher@fusonic.net-20100212091235-jqxrb62klx872ajc
* Updated Yii to 1.1.0
* Removed CodePress and CodeMirror
* Updated jQuery and some plugins
* Cleaned some code ...

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php
2
 
 
3
 
class HTMLPurifier_Printer_CSSDefinition extends HTMLPurifier_Printer
4
 
{
5
 
    
6
 
    protected $def;
7
 
    
8
 
    public function render($config) {
9
 
        $this->def = $config->getCSSDefinition();
10
 
        $ret = '';
11
 
        
12
 
        $ret .= $this->start('div', array('class' => 'HTMLPurifier_Printer'));
13
 
        $ret .= $this->start('table');
14
 
        
15
 
        $ret .= $this->element('caption', 'Properties ($info)');
16
 
        
17
 
        $ret .= $this->start('thead');
18
 
        $ret .= $this->start('tr');
19
 
        $ret .= $this->element('th', 'Property', array('class' => 'heavy'));
20
 
        $ret .= $this->element('th', 'Definition', array('class' => 'heavy', 'style' => 'width:auto;'));
21
 
        $ret .= $this->end('tr');
22
 
        $ret .= $this->end('thead');
23
 
        
24
 
        ksort($this->def->info);
25
 
        foreach ($this->def->info as $property => $obj) {
26
 
            $name = $this->getClass($obj, 'AttrDef_');
27
 
            $ret .= $this->row($property, $name);
28
 
        }
29
 
        
30
 
        $ret .= $this->end('table');
31
 
        $ret .= $this->end('div');
32
 
        
33
 
        return $ret;
34
 
    }
35
 
    
36
 
}
37
 
 
 
1
<?php
 
2
 
 
3
class HTMLPurifier_Printer_CSSDefinition extends HTMLPurifier_Printer
 
4
{
 
5
 
 
6
    protected $def;
 
7
 
 
8
    public function render($config) {
 
9
        $this->def = $config->getCSSDefinition();
 
10
        $ret = '';
 
11
 
 
12
        $ret .= $this->start('div', array('class' => 'HTMLPurifier_Printer'));
 
13
        $ret .= $this->start('table');
 
14
 
 
15
        $ret .= $this->element('caption', 'Properties ($info)');
 
16
 
 
17
        $ret .= $this->start('thead');
 
18
        $ret .= $this->start('tr');
 
19
        $ret .= $this->element('th', 'Property', array('class' => 'heavy'));
 
20
        $ret .= $this->element('th', 'Definition', array('class' => 'heavy', 'style' => 'width:auto;'));
 
21
        $ret .= $this->end('tr');
 
22
        $ret .= $this->end('thead');
 
23
 
 
24
        ksort($this->def->info);
 
25
        foreach ($this->def->info as $property => $obj) {
 
26
            $name = $this->getClass($obj, 'AttrDef_');
 
27
            $ret .= $this->row($property, $name);
 
28
        }
 
29
 
 
30
        $ret .= $this->end('table');
 
31
        $ret .= $this->end('div');
 
32
 
 
33
        return $ret;
 
34
    }
 
35
 
 
36
}
 
37
 
 
38
// vim: et sw=4 sts=4