microinginer/yii2-debug-user-switch
最新稳定版本:v1.0.0
Composer 安装命令:
composer require microinginer/yii2-debug-user-switch
包简介
User switcher
README 文档
README
This extension for yii2-debug. Use only development environment.
Install
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist microinginer/yii2-debug-user-switch:"dev-master"
or add
"microinginer/yii2-debug-user-switch":"dev-master"
to the require section of your composer.json file.
Configuration
// config/web.php if (YII_ENV_DEV) { $config['bootstrap'][] = 'debug'; $config['modules']['debug'] = [ 'class' => 'yii\debug\Module', ... 'panels' => [ 'switchUser' => [ 'class' => 'microinginer\switchUser\SwitchPanel', 'modelClass' => '\app\models\User', /* 'queryCondition' => function (\yii\db\ActiveQuery &$query, \yii\db\ActiveRecord $model) { $query->andWhere('suborg_id IS NOT NULL'); }, 'gridViewColumns' => [ 'full_name', [ 'attribute' => 'org.name', 'label' => 'Organization', ], [ 'label' => Yii::t('app', 'Roles'), 'value' => function ($model) { $roles = ''; foreach (Yii::$app->authManager->getRolesByUser($model->id) as $role) { $roles .= ', ' . $role->name; } $roles = substr($roles, 1); return $roles; } ], ], */ ] ], ... ]; }
统计信息
- 总下载量: 10.59k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 6
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2016-09-30