Closed
Description
I recently ran into this. unless you pure bootstrap template the flash service is pretty useless and you need to write a custom flash class if you dont use bootstrap or have different template for errors and stuff like that.
Should add another method, setHtmlTemplate
$di->set('flash', function () {
$flash = new Flash();
$flash->setCssClasses([
'error' => 'alert alert-danger',
'success' => 'alert alert-success',
'notice' => 'alert alert-info',
'warning' => 'alert alert-warning'
]);
$flash->setHtmlTemplate("<div class='{{ css }} alert-dismissible fade show m-alert m-alert--air' role='alert'>
<button type='button' class='close' data-dismiss='alert' aria-label='Close'></button>
{{ message }}
</div>");
retrun $flash;
});
Proposed version: 4.0 / 3.4.1?