4 changed files with 92 additions and 79 deletions
			
			
		@ -0,0 +1,24 @@
					 | 
				
			||||
<?php | 
				
			||||
use yii\helpers\Html; | 
				
			||||
 | 
				
			||||
if (empty($values)): ?> | 
				
			||||
<h3><?php echo $caption; ?></h3>
 | 
				
			||||
<p>Empty.</p> | 
				
			||||
<?php else:	?> | 
				
			||||
<h3><?php echo $caption; ?></h3>
 | 
				
			||||
<table class="table table-condensed table-bordered table-striped table-hover" style="table-layout: fixed;"> | 
				
			||||
	<thead> | 
				
			||||
		<tr> | 
				
			||||
			<th style="width: 200px;">Name</th> | 
				
			||||
			<th>Value</th> | 
				
			||||
		</tr> | 
				
			||||
	</thead> | 
				
			||||
	<?php foreach($values as $name => $value): ?> | 
				
			||||
		<tr> | 
				
			||||
			<th style="width: 200px;"><?php echo Html::encode($name); ?></th>
 | 
				
			||||
			<td><?php echo htmlspecialchars(var_export($value, true), ENT_QUOTES|ENT_SUBSTITUTE, \Yii::$app->charset, TRUE); ?></td>
 | 
				
			||||
		</tr> | 
				
			||||
	<?php endforeach; ?> | 
				
			||||
</tbody> | 
				
			||||
</table> | 
				
			||||
<?php endif; ?> | 
				
			||||
@ -0,0 +1,31 @@
					 | 
				
			||||
<?php 
 | 
				
			||||
use yii\bootstrap\Tabs; | 
				
			||||
 | 
				
			||||
echo Tabs::widget([ | 
				
			||||
	'items' => [ | 
				
			||||
		[ | 
				
			||||
			'label' => 'Parameters', | 
				
			||||
			'content' =>  $this->context->renderPartial('panels/request/_data_table', ['caption' => 'Routing', 'values' => $data]) | 
				
			||||
						. $this->context->renderPartial('panels/request/_data_table', ['caption' => '$_GET', 'values' => $panel->data['GET']]) | 
				
			||||
						. $this->context->renderPartial('panels/request/_data_table', ['caption' => '$_POST', 'values' => $panel->data['POST']]) | 
				
			||||
						. $this->context->renderPartial('panels/request/_data_table', ['caption' => '$_FILES', 'values' => $panel->data['FILES']]) | 
				
			||||
						. $this->context->renderPartial('panels/request/_data_table', ['caption' => '$_COOKIE', 'values' => $panel->data['COOKIE']]), | 
				
			||||
			'active' => true, | 
				
			||||
		], | 
				
			||||
		[ | 
				
			||||
			'label' => 'Headers', | 
				
			||||
			'content' =>  $this->context->renderPartial('panels/request/_data_table', ['caption' => 'Request Headers', 'values' => $panel->data['requestHeaders']]) | 
				
			||||
						. $this->context->renderPartial('panels/request/_data_table', ['caption' => 'Response Headers', 'values' => $panel->data['responseHeaders']]) | 
				
			||||
		], | 
				
			||||
		[ | 
				
			||||
			'label' => 'Session', | 
				
			||||
			'content' =>  $this->context->renderPartial('panels/request/_data_table', ['caption' => '$_SESSION', 'values' => $panel->data['SESSION']]) | 
				
			||||
						. $this->context->renderPartial('panels/request/_data_table', ['caption' => 'Flashes', 'values' => $panel->data['flashes']]) | 
				
			||||
		], | 
				
			||||
		[ | 
				
			||||
			'label' => '$_SERVER', | 
				
			||||
			'content' => $this->context->renderPartial('panels/request/_data_table', ['caption' => '$_SERVER', 'values' => $panel->data['SERVER']]), | 
				
			||||
		], | 
				
			||||
	], | 
				
			||||
]); | 
				
			||||
?> | 
				
			||||
@ -0,0 +1,23 @@
					 | 
				
			||||
<?php | 
				
			||||
use yii\helpers\Html; | 
				
			||||
use yii\web\Response; | 
				
			||||
 | 
				
			||||
$statusCode = $data['statusCode']; | 
				
			||||
if ($statusCode === null) { | 
				
			||||
	$statusCode = 200; | 
				
			||||
} | 
				
			||||
if ($statusCode >= 200 && $statusCode < 300) { | 
				
			||||
	$class = 'label-success'; | 
				
			||||
} elseif ($statusCode >= 100 && $statusCode < 200) { | 
				
			||||
	$class = 'label-info'; | 
				
			||||
} else { | 
				
			||||
	$class = 'label-important'; | 
				
			||||
} | 
				
			||||
$statusText = Html::encode(isset(Response::$httpStatuses[$statusCode]) ? Response::$httpStatuses[$statusCode] : ''); | 
				
			||||
?> | 
				
			||||
<div class="yii-debug-toolbar-block"> | 
				
			||||
	<a href="<?php echo $panel->getUrl(); ?>" title="Status code: <?php echo $statusCode; ?> <?php echo $statusText; ?>">Status <span class="label <?php echo $class; ?>"><?php echo $statusCode; ?></span></a>
 | 
				
			||||
</div> | 
				
			||||
<div class="yii-debug-toolbar-block"> | 
				
			||||
	<a href="<?php echo $panel->getUrl(); ?>">Action <span class="label"><?php echo $data['action']; ?></span></a>
 | 
				
			||||
</div> | 
				
			||||
					Loading…
					
					
				
		Reference in new issue