Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Customize default flash options

$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;
});

I'm using flash with customized. I need to modify delimeter (p), icon (type based icons) and custom button inside (link, close button).

How can i customize default flash options ?

edited Mar '16

Create a new CustomFlash class extends Flash make your customize and set $di->set('flash', function(){return new CustomFlash()});



9.0k
Accepted
answer

Thanks for solution.

I solved with getMessages() method of Phalcon\Flash\Session

Create a new CustomFlash class extends Flash make your customize and set $di->set('flash', function(){return new CustomFlash()});