code: public static function showFlashMessages($delete = true)
      {
          foreach (\Yii::$app->session->getAllFlashes() as $key => $message) {
  
              echo '<div class="alert alert-' . $key . '">'
                  . '<button type="button" class="close" data-dismiss="alert">×</button>'
                  . static::getSignByKey($key).'&nbsp;&nbsp;<strong>' . $message . "</strong/></div>\n";
          }
      }
docs: *
  @param bool $delete