Особенности:
- Поддержка и смена для всего проекта темы сообщений (Noty, Toastr)
- Отображение из ajax - actions
Например:
Код: Выделить всё
public function actionIndex(){
...
\Yii::$app->getSession()->setFlash('error', 'noty1');
\Yii::$app->getSession()->setFlash('info', 'noty2');
...
return $this->render('index');
}
// or in ajax action
public function actionAjax(){
...
\Yii::$app->getSession()->setFlash('success', 'ajax-noty3');
\Yii::$app->getSession()->setFlash('warning', 'ajax-noty4');
...
$data = 'Some data to be returned in response to ajax request';
Yii::$app->response->format = \yii\web\Response::FORMAT_JSON;
return $data;
}
Подробнее - https://github.com/loveorigami/yii2-not ... on-wrapper