{% extends '@WebProfiler/Profiler/layout.html.twig' %} {% block toolbar %} {% import _self as helper %} {% set request_handler %} {{ helper.set_handler(collector.controller) }} {% endset %} {% if collector.redirect %} {% set redirect_handler %} {{ helper.set_handler(collector.redirect.controller, collector.redirect.route, 'GET' != collector.redirect.method ? collector.redirect.method) }} {% endset %} {% endif %} {% if collector.forwardtoken %} {% set forward_profile = profile.childByToken(collector.forwardtoken) %} {% set forward_handler %} {{ helper.set_handler(forward_profile ? forward_profile.collector('request').controller : 'n/a') }} {% endset %} {% endif %} {% set request_status_code_color = (collector.statuscode >= 400) ? 'red' : (collector.statuscode >= 300) ? 'yellow' : 'green' %} {% set icon %} {{ collector.statuscode }} {% if collector.route %} {% if collector.redirect %}{{ include('@WebProfiler/Icon/redirect.svg') }}{% endif %} {% if collector.forwardtoken %}{{ include('@WebProfiler/Icon/forward.svg') }}{% endif %} {{ 'GET' != collector.method ? collector.method }} @ {{ collector.route }} {% endif %} {% endset %} {% set text %}
HTTP status {{ collector.statuscode }} {{ collector.statustext }}
{% if 'GET' != collector.method -%}
Method {{ collector.method }}
{%- endif %}
Controller {{ request_handler }}
Route name {{ collector.route|default('n/a') }}
Has session {% if collector.sessionmetadata|length %}yes{% else %}no{% endif %}
{% if redirect_handler is defined -%}
{{ collector.redirect.status_code }} Redirect from {{ redirect_handler }} ({{ collector.redirect.token }})
{% endif %} {% if forward_handler is defined %}
Forwarded to {{ forward_handler }} ({{ collector.forwardtoken }})
{% endif %} {% endset %} {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url }) }} {% endblock %} {% block menu %} {{ include('@WebProfiler/Icon/request.svg') }} Request / Response {% endblock %} {% block panel %} {% import _self as helper %}

{{ helper.set_handler(collector.controller) }}

Request

GET Parameters

{% if collector.requestquery.all is empty %}

No GET parameters

{% else %} {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestquery, maxDepth: 1 }, with_context = false) }} {% endif %}

POST Parameters

{% if collector.requestrequest.all is empty %}

No POST parameters

{% else %} {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestrequest, maxDepth: 1 }, with_context = false) }} {% endif %}

Request Attributes

{% if collector.requestattributes.all is empty %}

No attributes

{% else %} {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestattributes }, with_context = false) }} {% endif %}

Request Headers

{{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestheaders, labels: ['Header', 'Value'], maxDepth: 1 }, with_context = false) }}

Request Content

{% if collector.content == false %}

Request content not available (it was retrieved as a resource).

{% elseif collector.content %}
{{ collector.content }}
{% else %}

No content

{% endif %}

Server Parameters

Defined in .env

{{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.dotenvvars }, with_context = false) }}

Defined as regular env variables

{% set requestserver = [] %} {% for key, value in collector.requestserver if key not in collector.dotenvvars.keys %} {% set requestserver = requestserver|merge({(key): value}) %} {% endfor %} {{ include('@WebProfiler/Profiler/table.html.twig', { data: requestserver }, with_context = false) }}

Response

Response Headers

{{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.responseheaders, labels: ['Header', 'Value'], maxDepth: 1 }, with_context = false) }}

Cookies

Request Cookies

{% if collector.requestcookies.all is empty %}

No request cookies

{% else %} {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.requestcookies }, with_context = false) }} {% endif %}

Response Cookies

{% if collector.responsecookies.all is empty %}

No response cookies

{% else %} {{ include('@WebProfiler/Profiler/bag.html.twig', { bag: collector.responsecookies }, with_context = true) }} {% endif %}

Session

Session Metadata

{% if collector.sessionmetadata is empty %}

No session metadata

{% else %} {{ include('@WebProfiler/Profiler/table.html.twig', { data: collector.sessionmetadata }, with_context = false) }} {% endif %}

Session Attributes

{% if collector.sessionattributes is empty %}

No session attributes

{% else %} {{ include('@WebProfiler/Profiler/table.html.twig', { data: collector.sessionattributes, labels: ['Attribute', 'Value'] }, with_context = false) }} {% endif %}

Flashes

Flashes

{% if collector.flashes is empty %}

No flash messages were created.

{% else %} {{ include('@WebProfiler/Profiler/table.html.twig', { data: collector.flashes }, with_context = false) }} {% endif %}
{% if profile.parent %}

Parent Request

Return to parent request (token = {{ profile.parent.token }})

{{ include('@WebProfiler/Profiler/bag.html.twig', { bag: profile.parent.getcollector('request').requestattributes }, with_context = false) }}
{% endif %} {% if profile.children|length %}

Sub Requests {{ profile.children|length }}

{% for child in profile.children %}

{{ helper.set_handler(child.getcollector('request').controller) }} (token = {{ child.token }})

{{ include('@WebProfiler/Profiler/bag.html.twig', { bag: child.getcollector('request').requestattributes }, with_context = false) }} {% endfor %}
{% endif %}
{% endblock %} {% macro set_handler(controller, route, method) %} {% if controller.class is defined -%} {%- if method|default(false) %}{{ method }}{% endif -%} {%- set link = controller.file|file_link(controller.line) %} {%- if link %}{% else %}{% endif %} {%- if route|default(false) -%} @{{ route }} {%- else -%} {{- controller.class|abbr_class|striptags -}} {{- controller.method ? ' :: ' ~ controller.method -}} {%- endif -%} {%- if link %}{% else %}{% endif %} {%- else -%} {{ route|default(controller) }} {%- endif %} {% endmacro %}