+
+
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
- {% for formName, fields in collector.data %}
-
{{ formName }}
- {% if fields %}
- Field |
- Type |
- Value |
- Messages |
+ Message |
+ Cause |
- {% for fieldName, field in fields %}
+ {% 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 %}
+
- {{ fieldName }} |
- {{ field.type }} |
- {{ field.value }} |
+ View Format |
-
- {% for errorMessage in field.errors %}
- -
- {{ errorMessage.message }}
-
- {% endfor %}
-
+ {% 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 %}
-
This form is valid.
+
No options where passed when constructing this form.
{% endif %}
- {% else %}
-
No forms were submitted for this request.
+ {% endif %}
+
+ {% if data.resolved_options is defined %}
+
Resolved Options
+
+
+
+ Option |
+ Value |
+
+ {% for option, value in data.resolved_options %}
+
+ {{ option }} |
+ {{ value }} |
+
+ {% endfor %}
+
+ {% endif %}
+
+
View Variables
+
+
+
+ Variable |
+ Value |
+
+ {% for variable, value in data.view_vars %}
+
+ {{ variable }} |
+ {{ value }} |
+
+ {% endfor %}
+
+
+
+ {% for childName, childData in data.children %}
+ {{ _self.form_tree_details(childName, childData) }}
{% endfor %}
-{% endblock %}
+{% endmacro %}
diff --git a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig
index 7f10150c72..3b45ca1116 100644
--- a/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig
+++ b/src/Symfony/Bundle/WebProfilerBundle/Resources/views/Profiler/profiler.css.twig
@@ -63,6 +63,9 @@ table th, table td {
font-size: 12px;
padding: 8px 10px;
}
+table td em {
+ color: #aaa;
+}
fieldset {
border: none;
}
@@ -70,6 +73,9 @@ abbr {
border-bottom: 1px dotted #000;
cursor: help;
}
+pre, code {
+ font-size: 0.9em;
+}
.clear {
clear: both;
height: 0;
diff --git a/src/Symfony/Component/Form/Extension/DataCollector/Collector/FormCollector.php b/src/Symfony/Component/Form/Extension/DataCollector/Collector/FormCollector.php
deleted file mode 100644
index 82564e4068..0000000000
--- a/src/Symfony/Component/Form/Extension/DataCollector/Collector/FormCollector.php
+++ /dev/null
@@ -1,130 +0,0 @@
-
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Form\Extension\DataCollector\Collector;
-
-use Symfony\Component\EventDispatcher\EventSubscriberInterface;
-use Symfony\Component\Form\FormEvent;
-use Symfony\Component\Form\FormEvents;
-use Symfony\Component\Form\FormInterface;
-use Symfony\Component\HttpFoundation\Request;
-use Symfony\Component\HttpFoundation\Response;
-use Symfony\Component\HttpKernel\DataCollector\DataCollector as BaseCollector;
-
-/**
- * DataCollector for Form Validation.
- *
- * @author Robert Schönthal