vulcandigital / silverstripe-bootboxalert
Easily create a bootbox.js alert programatically using sessions
Installs: 13
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:silverstripe-vendormodule
Requires
- silverstripe/framework: ^4.0
Requires (Dev)
- phpunit/phpunit: ^5.7
- squizlabs/php_codesniffer: 3.*
This package is auto-updated.
Last update: 2024-12-18 20:47:40 UTC
README
Easily create a bootbox.js alert programatically using sessions
Requirements
- silverstripe/framework: ^4
Usage
Your controller
class PageController extends ContentController { private static $extensions = [ Vulcan\BootboxAlert\Extensions\BootboxAlertExtension::class ]; }
In your global template (Page.ss):
$BootboxAlert
Placing this method in the template will allow the script to be added to the page requirements at the very end to ensure bootbox has been required.
Setting the alert
BootboxAlert::setAlert("Example message");