{% extends '@WebProfiler/Profiler/layout.html.twig' %} {% import _self as helper %} {% block toolbar %} {% if collector.messages|length > 0 %} {% set status_color = collector.exceptionsCount ? 'red' %} {% set icon %} {{ source('@WebProfiler/Icon/messenger.svg') }} {{ collector.messages|length }} {% endset %} {% set text %} {% for bus in collector.buses %} {% set exceptionsCount = collector.exceptionsCount(bus) %}
{{ bus }} {{ collector.messages(bus)|length }}
{% endfor %} {% endset %} {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: 'messenger', status: status_color }) }} {% endif %} {% endblock %} {% block menu %} {{ source('@WebProfiler/Icon/messenger.svg') }} Messages {% if collector.exceptionsCount > 0 %} {{ collector.exceptionsCount }} {% endif %} {% endblock %} {% block head %} {{ parent() }} {% endblock %} {% block panel %} {% import _self as helper %}

Messages

{% if collector.messages is empty %}

No messages have been collected.

{% else %}
{% set messages = collector.messages %} {% set exceptionsCount = collector.exceptionsCount %}

All{{ messages|length }}

Ordered list of dispatched messages across all your buses

{{ helper.render_bus_messages(messages, true) }}
{% for bus in collector.buses %}
{% set messages = collector.messages(bus) %} {% set exceptionsCount = collector.exceptionsCount(bus) %}

{{ bus }}{{ messages|length }}

Ordered list of messages dispatched on the {{ bus }} bus

{{ helper.render_bus_messages(messages) }}
{% endfor %}
{% endif %} {% endblock %} {% macro render_bus_messages(messages, showBus = false) %} {% set discr = random() %} {% for dispatchCall in messages %} {% if showBus %} {% endif %} {% if dispatchCall.stamps_after_dispatch is defined %} {% endif %} {% if dispatchCall.exception is defined %} {% endif %}
{{ profiler_dump(dispatchCall.message.type) }} {% if showBus %} {{ dispatchCall.bus }} {% endif %} {% if dispatchCall.exception is defined %} exception {% endif %} {{ source('@WebProfiler/images/icon-minus-square.svg') }} {{ source('@WebProfiler/images/icon-plus-square.svg') }}
Bus {{ dispatchCall.bus }}
Message {{ profiler_dump(dispatchCall.message.value, maxDepth=2) }}
Envelope stamps when dispatching {% for item in dispatchCall.stamps %} {{ profiler_dump(item) }} {% else %} No items {% endfor %}
Envelope stamps after dispatch {% for item in dispatchCall.stamps_after_dispatch %} {{ profiler_dump(item) }} {% else %} No items {% endfor %}
Exception {{ profiler_dump(dispatchCall.exception.value, maxDepth=1) }}
{% endfor %} {% endmacro %}