vulcandigital/silverstripe-bootboxalert

使用会话轻松以编程方式创建 bootbox.js 提示程序

安装: 13

依赖项: 0

建议者: 0

安全: 0

星级: 0

观察者: 2

分支: 0

开放问题: 0

类型:silverstripe-vendormodule

1.0.0 2018-02-23 01:11 UTC

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");

许可证

BSD-3-Clause - Vulcan Digital Ltd