{% set typeClass = {success: 'success', error: 'error', info: 'info'} %}
{% if app.session.isStarted() and app.session.flashBag.peekAll|length > 0 %}
{% for type, typeMessages in app.session.flashbag.peekAll %}
{% if typeClass[type] is defined %}
{% for message in app.session.flashbag.get(type) %}