Display simple alert message(s) on page
Updated: August, 2015, (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-source "c006/yii2-alerts" "dev-master"
, (*4)
or add, (*5)
"c006/yii2-alerts": "dev-master"
, (*6)
to the require section of your composer.json
file., (*7)
jQuery, (*8)
yii \ widgets \ Bootstrap, (*9)
message => {string}
Alert message (HTML)
, (*10)
alert_type => {string}, (*11)
close => {boolean}
Show close link for alert
, (*12)
countdown => {int}
Automatically remove alert in X seconds
, (*13)
Demo: http://demo.c006.us, (*14)
Set message, (*15)
> Alerts::setMessage('Session Timeout'); Alerts::setAlertType(Alerts::ALERT_WARNING); Alerts::setCountdown(10); /* optional */, (*16)
Display message > = Alerts::widget() ?>, (*17)
Please provide any helpful feedback or requests., (*18)
Thanks., (*19)