<?php use sJo\Loader\Alert; if (Alert::exists()) { ?> <?php foreach (Alert::get() as $type => $alerts) { ?> <div class="alert alert-<?php echo $type; ?> clearfix" data-dismiss="alert"> <?php switch ($type) { case 'success': $icon = 'ok-sign'; break; case 'danger': $icon = 'remove-sign'; break; case 'warning': $icon = 'warning-sign'; break; case 'info': $icon = 'info-sign'; break; default: $icon = false; break; } ?>