Since: 2.0
Author: Qiang Xue (qiang.xue@gmail.com)
Inheritance: extends yii\base\Module, implements yii\base\BootstrapInterface
Example #1
0
<?php

if (class_exists('yii\\debug\\Module')) {
    $this->off(\yii\web\View::EVENT_END_BODY, [\yii\debug\Module::getInstance(), 'renderToolbar']);
}
/* @var $this \yii\web\View */
/* @var $content string */
use yii\helpers\Html;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs;
use app\assets\AppAsset;
AppAsset::register($this);
$this->beginPage();
?>
<!DOCTYPE html>
<html lang="<?php 
echo Yii::$app->language;
?>
">
<head>
    <meta charset="<?php 
echo Yii::$app->charset;
?>
">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <?php 
echo Html::csrfMetaTags();
?>
    <title><?php 
echo Html::encode($this->title);
use yii\bootstrap\ButtonDropdown;
use yii\bootstrap\ButtonGroup;
use yii\helpers\Html;
use yii\helpers\Url;
$this->title = 'Yii Debugger';
?>
<div class="default-view">
    <div id="yii-debug-toolbar" class="yii-debug-toolbar yii-debug-toolbar_position_top" style="display: none;">
        <div class="yii-debug-toolbar__bar">
            <div class="yii-debug-toolbar__block yii-debug-toolbar__title">
                <a href="<?php 
echo Url::to(['index']);
?>
">
                    <img width="29" height="30" alt="" src="<?php 
echo \yii\debug\Module::getYiiLogo();
?>
">
                </a>
            </div>

            <?php 
foreach ($panels as $panel) {
    ?>
                <?php 
    echo $panel->getSummary();
    ?>
            <?php 
}
?>
        </div>
Example #3
0
 /**
  * @inheritdoc
  */
 public function bootstrap($app)
 {
     parent::bootstrap($app);
     // override the log target with ours
     $this->logTarget = Yii::$app->getLog()->targets['debug'] = new LogTarget($this);
 }
Example #4
0
    //         'allowedIPs' => ['*.*.*.*'],
    //         'historySize' => 20,
    //         'panels' => [
    // //             'mongodb' => [
    // //                 'class' => 'yii\mongodb\debug\MongoDbPanel',
    // //             ],
    //         ],
    //         'on beforeAction' => function($event) {
    //             Yii::$app->getResponse()->format = 'html';
    //             Yii::$app->getView()->off('endBody', [
    //                 $event->sender,
    //                 'renderToolbar'
    //             ]);
    //         }
    //     ];
    $config['on beforeAction'] = function ($event) {
        Yii::$app->getView()->off('endBody', [\yii\debug\Module::getInstance(), 'renderToolbar']);
    };
    function _debug($var, $tags = null)
    {
        if (PhpConsole\Connector::getInstance()->isActiveClient()) {
            PhpConsole\Connector::getInstance()->getDebugDispatcher()->dispatchDebug($var, $tags, 1);
        }
    }
} else {
    function _debug($var, $tags = null)
    {
        // nothing
    }
}
return $config;
Example #5
0
<?php

/**
 * Created by PhpStorm.
 * User: bug
 * Date: 22.06.15
 * Time: 18:48
 */
$config = ['components' => ['request' => ['cookieValidationKey' => 'tZ_RrBX7OvzjL1mHW1d0zE5XeI-O3RkX']]];
if (!YII_ENV_TEST) {
    // configuration adjustments for 'dev' environment
    $config['bootstrap'][] = 'debug';
    $config['modules']['debug'] = ['class' => \yii\debug\Module::className(), 'allowedIPs' => ['*']];
    $config['bootstrap'][] = 'gii';
    $config['modules']['gii'] = ['class' => \yii\gii\Module::className(), 'allowedIPs' => ['*']];
}
return $config;