public function toHtml()
 {
     $this->setVar('id', $this->id);
     $this->setVar('caption', $this->caption);
     $this->setVar('tabs', $this->tabs->getTabHtml());
     $this->setVar('panelclass', $this->panelClass);
     $this->setVar('tabcontent', $this->tabs->getContentHtml());
     return $this->renderBySkin();
 }
 public function toHtml()
 {
     $topPanel = new TopPanelControl(null, 'debugTopPanel');
     $topPanel->setCaption('
             <div class="debug-block">
                 <span class="glyphicon glyphicon-flash"></span> &nbsp;&nbsp;' . QueryLog::count() . '
             </div>
             <div class="debug-block">
                 <span class="glyphicon glyphicon-time"></span> &nbsp;&nbsp;' . Profiler::getTotalTime() . ' ms
             </div>
             <div class="debug-block">
                 <span class="glyphicon glyphicon-oil"></span> &nbsp;&nbsp;' . round(memory_get_peak_usage() / 1024 / 1024, 1) . ' MB
             </div>
             ')->setOpened(Logging::isError());
     if ($this->mode === self::MODE_LARGE) {
         $tabControl = new TabControl(null, 'debugTabControl');
         $tabControl->addTab('Log (' . count(Logging::getLogItems()) . ')')->add($this->showLog());
         $tabControl->addTab('SQL-Queries (' . QueryLog::count() . ')')->add($this->showQueryLog());
         $tabControl->addTab('Request')->add($this->showNfsRequest());
         $tabControl->addTab('REQUEST-Array (' . count($_REQUEST) . ')')->add($this->showRequest());
         if (Configuration::get('logging.showServerVar') === 'true') {
             $tabControl->addTab('SERVER-Array (' . count($_SERVER) . ')')->add($this->showServer());
         }
         $tabControl->addTab('FILES-Array (' . count($_FILES) . ')')->add($this->showFiles());
         $tabControl->addTab('Profiler')->add($this->showProfilerInfo());
         $tabControl->addTab('Cache')->add($this->showTabInfo());
         $tabControl->addTab('Debug')->add($this->showDebugTab());
         $topPanel->add($tabControl);
     }
     Javascript::addJs($topPanel->getJavascript());
     return $topPanel->toHtml();
 }