18 $renderer = Yii::app()->getComponent(
'viewRenderer');
19 Yii::app()->setComponent(
'viewRenderer', null);
20 Yii::app()->setComponents(array(
21 'viewRenderer' => array(
22 'class' =>
'Yii2DebugViewRenderer',
23 'instance' => $renderer,
30 if (
$count = count($this->data)) {
31 return $this->
render(dirname(__FILE__) .
'/../views/panels/view_bar.php', array(
41 $base = dirname(Yii::app()->getBasePath()) . DIRECTORY_SEPARATOR;
42 foreach (
$data as &$item) {
43 $item[
'view'] = str_replace($base,
'', $item[
'view']);
44 $item[
'view'] = str_replace(
'\\',
'/', $item[
'view']);
47 return $this->
render(dirname(__FILE__) .
'/../views/panels/view.php', array(
55 $renderer = Yii::app()->getComponent(
'viewRenderer');
65 if (is_array(
$data)) {
66 foreach (
$data as $key => $value) {
69 } elseif (is_object(
$data)) {
70 $result[
'class'] = get_class(
$data);
71 if (
$data instanceof CActiveRecord) {
72 foreach (
$data->attributes as $field => $value) {
73 $result[$field] = $value;
76 foreach (get_object_vars(
$data) as $key => $value) {