Within flashSession, you can specify custom CSS classes for alerts, in this instance we're using boostrap.
$di->set('flashSession', function() {
$flash = new flashSession(array(
'error' => 'alert alert-danger alert-dismissable',
'success' => 'alert alert-success alert-dismissable',
'notice' => 'alert alert-info alert-dismissable',
'warning' => 'alert alert-warning alert-dismissable'
));
return $flash;
});
So although the alert-dismissable is present and pushed out, we can't deploy the code for the close button within that alert.
<a href="#" class="close" data-dismiss="alert" aria-label="close">×</a>
Some would probably suggest putting this into same place where the text for the alert is but you end up getting the code priniting to screen. Which in a way is quite secure.
The suggestion then is something as easy as
$this->flashSession->error('Please specify an e-mail address', TRUE);
Where TRUE enables a close within the alert div.