{% extends '@WebProfiler/Profiler/layout.html.twig' %}
{% from _self import form_tree_entry, form_tree_details %}
{% block toolbar %}
{% if collector.data|length %}
{% set icon %}
{% if collector.data.nb_errors %}{{ collector.data.nb_errors }}{% else %}{{ collector.data.forms|length }}{% endif %}
{% endset %}
{% include '@WebProfiler/Profiler/toolbar_item.html.twig' with { 'link': profiler_url } %}
{% endif %}
{% endblock %}
{% block menu %}
Forms
{% if collector.data.forms|length %}
{{ collector.data.forms|length }}
{% endif %}
{% endblock %}
{% block panel %}
{% if collector.data.forms|length %}
Forms
{% for formName, formData in collector.data.forms %}
{{ form_tree_entry(formName, formData) }}
{% endfor %}
{% for formName, formData in collector.data.forms %}
{{ form_tree_details(formName, formData) }}
{% endfor %}
{% else %}
{{ name }}
{% if data.type_class is defined %}
[{{ data.type }}]
{% endif %}
{% if data.errors is defined and data.errors|length > 0 %}
Errors
| Message |
Cause |
{% for error in data.errors %}
| {{ error.message }} |
Unknown. |
{% endfor %}
{% endif %}
{% if data.default_data is defined %}
Default Data
| Model Format |
{% if data.default_data.model is defined %}
{{ data.default_data.model }}
{% else %}
same as normalized format
{% endif %}
|
| Normalized Format |
{{ data.default_data.norm }} |
| View Format |
{% if data.default_data.view is defined %}
{{ data.default_data.view }}
{% else %}
same as normalized format
{% endif %}
|
{% endif %}
{% if data.submitted_data is defined %}
Submitted Data
{% if data.submitted_data.norm is defined %}
| View Format |
{% if data.submitted_data.view is defined %}
{{ data.submitted_data.view }}
{% else %}
same as normalized format
{% endif %}
|
| Normalized Format |
{{ data.submitted_data.norm }} |
| Model Format |
{% if data.submitted_data.model is defined %}
{{ data.submitted_data.model }}
{% else %}
same as normalized format
{% endif %}
|
{% else %}
This form was not submitted.
{% endif %}
{% endif %}
{% if data.passed_options is defined %}
Passed Options
{% if data.passed_options|length %}
| Option |
Passed Value |
Resolved Value |
{% for option, value in data.passed_options %}
| {{ option }} |
{{ value }} |
{% if data.resolved_options[option] is sameas(value) %}
same as passed value
{% else %}
{{ data.resolved_options[option] }}
{% endif %}
|
{% endfor %}
{% else %}
No options where passed when constructing this form.
{% endif %}
{% endif %}
{% if data.resolved_options is defined %}
Resolved Options
| Option |
Value |
{% for option, value in data.resolved_options %}
| {{ option }} |
{{ value }} |
{% endfor %}
{% endif %}
{% if data.view_vars is defined %}
View Variables
| Variable |
Value |
{% for variable, value in data.view_vars %}
| {{ variable }} |
{{ value }} |
{% endfor %}
{% endif %}
{% for childName, childData in data.children %}
{{ _self.form_tree_details(childName, childData) }}
{% endfor %}
{% endmacro %}