Skip to content


Subversion checkout URL

You can clone with
Download ZIP
ZF2 module v1.0.1 - Boost your FlashMessenger ! Has been merged in ZF 2.1.
PHP Shell
Latest commit 221935b @blanchonvincent Add info in readme
Failed to load latest commit information.
config Fix config files
src/SuperMessenger Fix view helper factory
tests Fix view helper factory
.gitignore first commit
Module.php first commit Add info in readme
composer.json Fix view helper factory

ZF2 SuperMessenger module

Version 1.0.1 Created by Vincent Blanchon

/!\ This module is now a PR to Zend Framework 2 : Give me your feedback !


ZF2 SuperMessenger module provide new features for plugin FlashMessenger. Now, you can add directly 3 level of messages : success message, error message or info message.


• Usage in controller :


Just active the module and the FlashMessenger will have features without BC ! You can use SuperMessenger by the identifier "FlashMessenger" with the alias. You could use the identifier "SuperMessenger" to pilot the plugin.

• Usage in view :

And to be complete, there is a view helper. Usage in a view to get list of messages :

    $infoMessages = $this->flashMessenger('info');

You can directly have a render of the messages :

    echo $this->flashMessenger()->render('info');

By default, the format is :

<ul class="info">
    <li>first message</li>
    <li>second message</li>

You can change the format, like this :

    echo $this->flashMessenger()

Format could be changed in supermessenger.local.php which will be moved in "/config/autoload" :

'view_helper' => array(
    'supermessenger' => array(
        'message_open_format' => '<div%s><ul><li>',
        'message_separator_string' => '</li><li>',
        'message_close_string' => '</li></ul></div>',

You can change easily the class CSS with :

    echo $this->flashMessenger()->render('info', array('foo-baz', 'foo-bar'));
<ul class="foo-baz foo-bar">
    <li>first message</li>
    <li>second message</li>
Something went wrong with that request. Please try again.