We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

Settings CSS classes for a session flash message?

How to set the CSS styles for a message set with $this->flashSession->success as it showed only how to do it for Implicit Flush flashes in the docs. :)

$di->set('flashSession', function(){
    $flash = new \Phalcon\Flash\Session(array(
        'error' => 'alert alert-danger',
        'success' => 'alert alert-success',
        'notice' => 'alert alert-info',
    return $flash;