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

Skip to content

Commit 4cb24b9

Browse files
94nonijaviereguiluz
authored andcommitted
[Profiler] [DataCollector] document cloneVar & profiler_dump
1 parent 38391bf commit 4cb24b9

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['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