mdmsoft/yii2-action-filter
最新稳定版本:1.0.1
Composer 安装命令:
composer require mdmsoft/yii2-action-filter
包简介
Force entry code to enter
README 文档
README
Force entry code to enter to the action.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require mdmsoft/yii2-action-filter "~1.0"
for dev-master
php composer.phar require mdmsoft/yii2-action-filter "dev-master"
or add
"mdmsoft/yii2-action-filter": "~1.0"
to the require section of your composer.json file.
Usage
After instalation done. Attach filter to Module or Application
$config['modules']['gii'] = [ 'class' => 'yii\gii\Module', 'as access' => [ 'class' => 'mdm\filter\EnterCode', 'timeout' => 600, // default 300 'validationCallback' => function ($code, $actionId) { return $code === 'bismillah'; }, 'only' => [ 'default/view', // actions ] ], ]
You can cutomize view of verify controler by setting property viewFile
... 'as access' => [ 'class' => 'mdm\filter\EnterCode', 'viewFile' => '@your/views/verify.php', ...
统计信息
- 总下载量: 1.88k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 3
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause
- 更新时间: 2014-10-29