hiryu85 / cakephp-flash
此包的最新版本(dev-master)没有提供许可证信息。
CakePHP Flash 组件,用于 Twitter Bootstrap 和 Alertify
dev-master
2015-03-22 16:17 UTC
Requires
This package is not auto-updated.
Last update: 2024-10-02 08:46:47 UTC
README
使用 Cake 的 flash 消息与 Twitter Bootstrap 或 Alertify
安装
- 将插件克隆/复制到您的 app/Plugin 目录
- 在 bootstrap.php 中添加
CakePlugin::load('Flash')
加载 Flash 组件
Class AppController extends Controller {
public $components = [
'Flash.Flash' => [
'style' => 'AlertifyBootstrap', // Choose "TwitterBootstrap or AlertifyBootstrap"
],
];
}
从您的控制器调用 Flash 组件
$this->Flash->success('Post created'); // Use default Component style (Flash's style setting)
$this->Flash->twitter_success('Post created'); // Use TwitterBootstrap alert