init
This commit is contained in:
55
vendor/yiisoft/yii2-debug/views/default/panels/config/detail.php
vendored
Normal file
55
vendor/yiisoft/yii2-debug/views/default/panels/config/detail.php
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
<?php
|
||||
/* @var $panel yii\debug\panels\ConfigPanel */
|
||||
$extensions = $panel->getExtensions();
|
||||
?>
|
||||
<h1>Configuration</h1>
|
||||
|
||||
<?php
|
||||
$formatLanguage = function($locale) {
|
||||
if (class_exists('Locale', false)) {
|
||||
$region = Locale::getDisplayLanguage($locale, 'en');
|
||||
$language = Locale::getDisplayRegion($locale, 'en');
|
||||
return ' (' . implode(',', array_filter([$language, $region])) . ')';
|
||||
}
|
||||
return '';
|
||||
};
|
||||
$app = $panel->data['application'];
|
||||
echo $this->render('table', [
|
||||
'caption' => 'Application Configuration',
|
||||
'values' => [
|
||||
'Yii Version' => $app['yii'],
|
||||
'Application Name' => $app['name'],
|
||||
'Application Version' => $app['version'],
|
||||
'Current Language' => !empty($app['language']) ? $app['language'] . $formatLanguage($app['language']) : '',
|
||||
'Source Language' => !empty($app['sourceLanguage']) ? $app['sourceLanguage'] . $formatLanguage($app['sourceLanguage']) : '',
|
||||
'Charset' => !empty($app['charset']) ? $app['charset'] : '',
|
||||
'Environment' => $app['env'],
|
||||
'Debug Mode' => $app['debug'] ? 'Yes' : 'No',
|
||||
],
|
||||
]);
|
||||
|
||||
if (!empty($extensions)) {
|
||||
echo $this->render('table', [
|
||||
'caption' => 'Installed Extensions',
|
||||
'values' => $extensions,
|
||||
]);
|
||||
}
|
||||
|
||||
$memcache = 'Disabled';
|
||||
if ($panel->data['php']['memcache']) {
|
||||
$memcache = 'Enabled (memcache)';
|
||||
} elseif ($panel->data['php']['memcached']) {
|
||||
$memcache = 'Enabled (memcached)';
|
||||
}
|
||||
|
||||
echo $this->render('table', [
|
||||
'caption' => 'PHP Configuration',
|
||||
'values' => [
|
||||
'PHP Version' => $panel->data['php']['version'],
|
||||
'Xdebug' => $panel->data['php']['xdebug'] ? 'Enabled' : 'Disabled',
|
||||
'APC' => $panel->data['php']['apc'] ? 'Enabled' : 'Disabled',
|
||||
'Memcache' => $memcache,
|
||||
],
|
||||
]);
|
||||
|
||||
echo $panel->getPhpInfo();
|
||||
10
vendor/yiisoft/yii2-debug/views/default/panels/config/summary.php
vendored
Normal file
10
vendor/yiisoft/yii2-debug/views/default/panels/config/summary.php
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
/* @var $panel yii\debug\panels\ConfigPanel */
|
||||
?>
|
||||
<div class="yii-debug-toolbar__block">
|
||||
<a href="<?= $panel->getUrl() ?>">
|
||||
<span class="yii-debug-toolbar__label"><?= $panel->data['application']['yii'] ?></span>
|
||||
PHP
|
||||
<span class="yii-debug-toolbar__label"><?= $panel->data['php']['version'] ?></span>
|
||||
</a>
|
||||
</div>
|
||||
33
vendor/yiisoft/yii2-debug/views/default/panels/config/table.php
vendored
Normal file
33
vendor/yiisoft/yii2-debug/views/default/panels/config/table.php
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
use yii\helpers\Html;
|
||||
|
||||
/* @var $caption string */
|
||||
/* @var $values array */
|
||||
?>
|
||||
|
||||
<h3><?= $caption ?></h3>
|
||||
|
||||
<?php if (empty($values)): ?>
|
||||
|
||||
<p>Empty.</p>
|
||||
|
||||
<?php else: ?>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-condensed table-bordered table-striped table-hover" style="table-layout: fixed;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="nowrap">Name</th>
|
||||
<th>Value</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php foreach ($values as $name => $value): ?>
|
||||
<tr>
|
||||
<th style="white-space: normal"><?= Html::encode($name) ?></th>
|
||||
<td style="overflow:auto"><?= Html::encode($value) ?></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
Reference in New Issue
Block a user