|
|
@ -23,13 +23,13 @@ class Alert extends \yii\bootstrap\Alert |
|
|
|
private $_doNotRender = false; |
|
|
|
private $_doNotRender = false; |
|
|
|
public function init() |
|
|
|
public function init() |
|
|
|
{ |
|
|
|
{ |
|
|
|
if ($this->body = \Yii::$app->getSession()->getFlash('error')) { |
|
|
|
if ($this->body = \Yii::$app->getSession()->getFlash('error', null, true)) { |
|
|
|
Html::addCssClass($this->options, 'alert-danger'); |
|
|
|
Html::addCssClass($this->options, 'alert-danger'); |
|
|
|
} elseif ($this->body = \Yii::$app->getSession()->getFlash('success')) { |
|
|
|
} elseif ($this->body = \Yii::$app->getSession()->getFlash('success', null, true)) { |
|
|
|
Html::addCssClass($this->options, 'alert-success'); |
|
|
|
Html::addCssClass($this->options, 'alert-success'); |
|
|
|
} elseif ($this->body = \Yii::$app->getSession()->getFlash('info')) { |
|
|
|
} elseif ($this->body = \Yii::$app->getSession()->getFlash('info', null, true)) { |
|
|
|
Html::addCssClass($this->options, 'alert-info'); |
|
|
|
Html::addCssClass($this->options, 'alert-info'); |
|
|
|
} elseif ($this->body = \Yii::$app->getSession()->getFlash('warning')) { |
|
|
|
} elseif ($this->body = \Yii::$app->getSession()->getFlash('warning', null, true)) { |
|
|
|
Html::addCssClass($this->options, 'alert-warning'); |
|
|
|
Html::addCssClass($this->options, 'alert-warning'); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
$this->_doNotRender = true; |
|
|
|
$this->_doNotRender = true; |
|
|
|