8000 [Profiler] [DataCollector] document `cloneVar` & `profiler_dump` · symfony/symfony-docs@7c0ff42 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7c0ff42

Browse files
authored
[Profiler] [DataCollector] document cloneVar & profiler_dump
1 parent 0b4e088 commit 7c0ff42

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

profiler.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,13 @@ template access to the collected information::
369369
{
370370
return $this->data['acceptable_content_types'];
371371
}
372+
373+
// In case you want to dump collected data in the profiler
374+
// you can leverage this function
375+
public function getObject()
376+
{
377+
return $this->cloneVar($this->data['method']);
378+
}
372379
}
373380

374381
In the simplest case, you want to display the information in the toolbar
@@ -472,6 +479,11 @@ must also define additional blocks:
472479
<td>{{ type }}</td>
473480
</tr>
474481
{% endfor %}
482+
483+
{# In case of specific object, you can leverage the profiler_dump() function #}
484+
<tr>
485+
{{ profiler_dump(collector.object) }}
486+
</tr>
475487
</table>
476488
{% endblock %}
477489

0 commit comments

Comments
 (0)
0