All flash messages are displayed in the sequence they were assigned using
yii\web\Session::setFlash()-detail).
You can set messages as follows:
php
Yii::$app->session->setFlash('error', 'This is the message');
Yii::$app->session->setFlash('success', 'This is the message');
Yii::$app->session->setFlash('info', 'This is the message');
Multiple messages can be set by specifying an array:
php
Yii::$app->session->setFlash('error', ['Error 1', 'Error 2']);