there are two way to use flash message, Direct or Session. with the Direct, we can register the flash service with custom CSS classes, just like
$di->set('flash', function () {
$flash = new FlashDirect(
array(
'error' => 'alert alert-danger',
'success' => 'alert alert-success',
'notice' => 'alert alert-info',
'warning' => 'alert alert-warning'
)
);
return $flash;
});
so the html code with Twitter bootstrap
<div class="errorMessage">too bad! the form had errors</div>
will become
<div class="alert alert-danger">too bad! the form had errors</div>
my question is how can it work with flash session.
thanks!