thirdparty/htmlpurifier-4.0.0-lite/library/HTMLPurifier/Printer/HTMLDefinition.php
protected function renderChildren($def) {
        $context = new HTMLPurifier_Context();
        $ret = '';
        $ret .= $this->start('tr');
            $elements = array();
            $attr = array();
            if (isset($def->elements)) {
                if ($def->type == 'strictblockquote') {
                    $def->validateChildren(array(), $this->config, $context);
                }
                $elements = $def->elements;
            }
            if ($def->type == 'chameleon') {
                $attr['rowspan'] = 2;
            } elseif ($def->type == 'empty') {
                $elements = array();
            } elseif ($def->type == 'table') {
                $elements = array_flip(array('col', 'caption', 'colgroup', 'thead',
                    'tfoot', 'tbody', 'tr'));
            }
            $ret .= $this->element('th', 'Allowed children', $attr);

            if ($def->type == 'chameleon') {

                $ret .= $this->element('td',
                    '<em>Block</em>: ' .
                    $this->escape($this->listifyTagLookup($def->block->elements)),0,0);
                $ret .= $this->end('tr');
                $ret .= $this->start('tr');
                $ret .= $this->element('td',
                    '<em>Inline</em>: ' .
                    $this->escape($this->listifyTagLookup($def->inline->elements)),0,0);

            } elseif ($def->type == 'custom') {

                $ret .= $this->element('td', '<em>'.ucfirst($def->type).'</em>: ' .
                    $def->dtd_regex);

            } else {
                $ret .= $this->element('td',
                    '<em>'.ucfirst($def->type).'</em>: ' .
                    $this->escape($this->listifyTagLookup($elements)),0,0);
            }
        $ret .= $this->end('tr');
        return $ret;
    }
protected function renderChildren($def) {
        $context = new HTMLPurifier_Context();
        $ret = '';
        $ret .= $this->start('tr');
            $elements = array();
            $attr = array();
            if (isset($def->elements)) {
                if ($def->type == 'strictblockquote') {
                    $def->validateChildren(array(), $this->config, $context);
                }
                $elements = $def->elements;
            }
            if ($def->type == 'chameleon') {
                $attr['rowspan'] = 2;
            } elseif ($def->type == 'empty') {
                $elements = array();
            } elseif ($def->type == 'table') {
                $elements = array_flip(array('col', 'caption', 'colgroup', 'thead',
                    'tfoot', 'tbody', 'tr'));
            }
            $ret .= $this->element('th', 'Allowed children', $attr);

            if ($def->type == 'chameleon') {

                $ret .= $this->element('td',
                    '<em>Block</em>: ' .
                    $this->escape($this->listifyTagLookup($def->block->elements)),0,0);
                $ret .= $this->end('tr');
                $ret .= $this->start('tr');
                $ret .= $this->element('td',
                    '<em>Inline</em>: ' .
                    $this->escape($this->listifyTagLookup($def->inline->elements)),0,0);

            } elseif ($def->type == 'custom') {

                $ret .= $this->element('td', '<em>'.ucfirst($def->type).'</em>: ' .
                    $def->dtd_regex);

            } else {
                $ret .= $this->element('td',
                    '<em>'.ucfirst($def->type).'</em>: ' .
                    $this->escape($this->listifyTagLookup($elements)),0,0);
            }
        $ret .= $this->end('tr');
        return $ret;
    }
protected function renderChildren ( $ def ) { $ context = new HTMLPurifier_Context ( ) ; $ ret = '' ; $ ret .= $ this -> start ( 'tr' ) ; $ elements = array ( ) ; $ attr = array ( ) ; if ( isset ( $ def -> elements ) ) { if ( $ def -> type == 'strictblockquote' ) { $ def -> validateChildren ( array ( ) , $ this -> config , $ context ) ; } $ elements = $ def -> elements ; } if ( $ def -> type == 'chameleon' ) { $ attr [ 'rowspan' ] = 2 ; } elseif ( $ def -> type == 'empty' ) { $ elements = array ( ) ; } elseif ( $ def -> type == 'table' ) { $ elements = array_flip ( array ( 'col' , 'caption' , 'colgroup' , 'thead' , 'tfoot' , 'tbody' , 'tr' ) ) ; } $ ret .= $ this -> element ( 'th' , 'Allowed children' , $ attr ) ; if ( $ def -> type == 'chameleon' ) { $ ret .= $ this -> element ( 'td' , '<em>Block</em>: ' . $ this -> escape ( $ this -> listifyTagLookup ( $ def -> block -> elements ) ) , 0 , 0 ) ; $ ret .= $ this -> end ( 'tr' ) ; $ ret .= $ this -> start ( 'tr' ) ; $ ret .= $ this -> element ( 'td' , '<em>Inline</em>: ' . $ this -> escape ( $ this -> listifyTagLookup ( $ def -> inline -> elements ) ) , 0 , 0 ) ; } elseif ( $ def -> type == 'custom' ) { $ ret .= $ this -> element ( 'td' , '<em>' . ucfirst ( $ def -> type ) . '</em>: ' . $ def -> dtd_regex ) ; } else { $ ret .= $ this -> element ( 'td' , '<em>' . ucfirst ( $ def -> type ) . '</em>: ' . $ this -> escape ( $ this -> listifyTagLookup ( $ elements ) ) , 0 , 0 ) ; } $ ret .= $ this -> end ( 'tr' ) ; return $ ret ; }
Renders a row describing the allowed children of an element
@param $def HTMLPurifier_ChildDef of pertinent element
Renders a row describing the allowed children of an element