10000 minor #18470 [Profiler] [DataCollector] document `cloneVar` & `profil… · symfony/symfony-docs@0296633 · GitHub
[go: up one dir, main page]

Skip to content

Commit 0296633

Browse files
committed
minor #18470 [Profiler] [DataCollector] document cloneVar & profiler_dump (94noni)
This PR was submitted for the 6.3 branch but it was merged into the 6.2 branch instead. Discussion ---------- [Profiler] [DataCollector] document `cloneVar` & `profiler_dump` Small addition regarding profiler and data collector part Commits ------- 4cb24b9 8000 [Profiler] [DataCollector] document `cloneVar` & `profiler_dump`
2 parents 38391bf + 4cb24b9 commit 0296633

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
@@ -360,6 +360,13 @@ template access to the collected information::
360360
{
361361
return $this->data[&# 8000 39;acceptable_content_types'];
362362
}
363+
364+
// In case you want to dump collected data in the profiler
365+
// you can leverage this function
366+
public function getObject()
367+
{
368+
return $this->cloneVar($this->data['method']);
369+
}
363370
}
364371

365372
In the simplest case, you want to display the information in the toolbar
@@ -463,6 +470,11 @@ must also define additional blocks:
463470
<td>{{ type }}</td>
464471
</tr>
465472
{% endfor %}
473+
474+
{# In case of specific object, you can leverage the profiler_dump() function #}
475+
<tr>
476+
{{ profiler_dump(collector.object) }}
477+
</tr>
466478
</table>
467479
{% endblock %}
468480

0 commit comments

Comments
 (0)
0