99 $this->_owner = $owner;
101 $this->_tag = $owner->getTag();
110 if ($this->_logsEnabled) {
161 return Yii::app()->createUrl($this->
getOwner()->moduleId .
'/default/view', array(
163 'panel' => $this->
getId(),
173 if ($tag) $this->_tag = $tag;
174 $this->_data =
$data;
183 public function render($_viewFile_, $_data_ = null)
185 if (is_array($_data_)) {
191 ob_implicit_flush(
false);
192 require($_viewFile_);
193 return ob_get_clean();
205 return $this->
render(dirname(__FILE__) .
'/views/panels/_detail.php', array(
206 'caption' => $caption,
220 return $this->
render(dirname(__FILE__) .
'/views/panels/_tabs.php', array(
221 'id' =>
'tabs' . ($counter++),
238 if ($this->_hl === null) {
239 $this->_hl = Yii::createComponent(array(
240 'class' =>
'CTextHighlighter',
242 'showLineNumbers' =>
false,
245 $html = $this->_hl->highlight($code);
246 return strip_tags($html,
'<div>,<span>');
256 if (!$this->_logRoute) {
257 throw new Exception(
'Yii2DebugLogRoute not initialized.');
260 return $this->_logRoute->getLogs();
270 'class' =>
'yii2-debug.Yii2DebugLogRoute',
271 'categories' => $this->_logsCategories,
272 'levels' => $this->_logsLevels,
275 $this->_logRoute = Yii::createComponent(
$config);
276 $this->_logRoute->init();
278 $routeName =
'yii2debug-' . uniqid();
279 Yii::app()->log->setRoutes(array($routeName => $this->_logRoute));
280 $allRoutes = Yii::app()->log->getRoutes();
281 $this->_logRoute = $allRoutes[$routeName];