From 4cb24b9d9383d661401d2cdd46ddaef15a71d057 Mon Sep 17 00:00:00 2001 From: Antoine M Date: Fri, 30 Jun 2023 08:43:53 +0200 Subject: [PATCH] [Profiler] [DataCollector] document `cloneVar` & `profiler_dump` --- profiler.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/profiler.rst b/profiler.rst index f14fdcee0a7..b3ada048ea8 100644 --- a/profiler.rst +++ b/profiler.rst @@ -360,6 +360,13 @@ template access to the collected information:: { return $this->data['acceptable_content_types']; } + + // In case you want to dump collected data in the profiler + // you can leverage this function + public function getObject() + { + return $this->cloneVar($this->data['method']); + } } In the simplest case, you want to display the information in the toolbar @@ -463,6 +470,11 @@ must also define additional blocks: {{ type }} {% endfor %} + + {# In case of specific object, you can leverage the profiler_dump() function #} + + {{ profiler_dump(collector.object) }} + {% endblock %}