vulcandigital / silverstripe-bootboxalert
使用会话轻松以编程方式创建 bootbox.js 提示程序
1.0.0
2018-02-23 01:11 UTC
Requires
- silverstripe/framework: ^4.0
Requires (Dev)
- phpunit/phpunit: ^5.7
- squizlabs/php_codesniffer: 3.*
This package is auto-updated.
Last update: 2024-09-18 20:23:07 UTC
README
使用会话轻松以编程方式创建 bootbox.js 提示程序
需求
- silverstripe/framework: ^4
使用
您的控制器
class PageController extends ContentController { private static $extensions = [ Vulcan\BootboxAlert\Extensions\BootboxAlertExtension::class ]; }
在您的全局模板(Page.ss)中
$BootboxAlert
将此方法放置在模板中,将允许脚本在页面要求的最末尾添加,以确保已要求 bootbox。
设置提示
BootboxAlert::setAlert("Example message");