Ejemplo n.º 1
0
 protected function appendContent(DOMElement $wrapper)
 {
     $content = parent::appendContent($wrapper);
     $source = null;
     $type = null;
     if ($this->show == 'frontend') {
         $url = clone $this->url;
         $url->parameters()->debug = 'iframe';
         $url->parameters()->{'debug-state'} = $this->state;
         $iframe = $this->document->createElement('iframe');
         $iframe->setAttribute('height', '400');
         $iframe->setAttribute('width', '400');
         $iframe->setAttribute('src', (string) $url);
         $content->appendChild($iframe);
         unset($url->parameters()->{'debug-get-output'});
     } else {
         if ($this->show == 'source') {
             $search = $this->document->createElement('div');
             $search->setAttribute('id', 'search');
             $input = Widget::Input('search');
             $search->appendChild($input);
             $content->appendChild($search);
             $this->appendSource($content, $this->input, 'xml');
         } else {
             if ($this->show == 'output') {
                 $this->appendSource($content, $this->output, 'xml');
             } else {
                 if ($this->show == 'params') {
                     $this->appendParams($content);
                 } else {
                     $this->appendFile($content);
                 }
             }
         }
     }
 }