|
@ -2,6 +2,7 @@ |
|
|
namespace common\widgets; |
|
|
namespace common\widgets; |
|
|
|
|
|
|
|
|
use Yii; |
|
|
use Yii; |
|
|
|
|
|
use yii\bootstrap4\Widget; |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* Alert widget renders a message from session flash. All flash messages are displayed |
|
|
* Alert widget renders a message from session flash. All flash messages are displayed |
|
@ -22,7 +23,7 @@ use Yii; |
|
|
* @author Kartik Visweswaran <kartikv2@gmail.com> |
|
|
* @author Kartik Visweswaran <kartikv2@gmail.com> |
|
|
* @author Alexander Makarov <sam@rmcreative.ru> |
|
|
* @author Alexander Makarov <sam@rmcreative.ru> |
|
|
*/ |
|
|
*/ |
|
|
class Alert extends \yii\bootstrap\Widget |
|
|
|
|
|
|
|
|
class Alert extends Widget |
|
|
{ |
|
|
{ |
|
|
/** |
|
|
/** |
|
|
* @var array the alert types configuration for the flash messages. |
|
|
* @var array the alert types configuration for the flash messages. |
|
@ -59,7 +60,7 @@ class Alert extends \yii\bootstrap\Widget |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
foreach ((array) $flash as $i => $message) { |
|
|
foreach ((array) $flash as $i => $message) { |
|
|
echo \yii\bootstrap\Alert::widget([ |
|
|
|
|
|
|
|
|
echo \yii\bootstrap4\Alert::widget([ |
|
|
'body' => $message, |
|
|
'body' => $message, |
|
|
'closeButton' => $this->closeButton, |
|
|
'closeButton' => $this->closeButton, |
|
|
'options' => array_merge($this->options, [ |
|
|
'options' => array_merge($this->options, [ |
|
|