Skip to content

Commit 2dfcd1e

Browse files
committed
Merge branch '6.2' into 6.3
* 6.2: [Profiler] [DataCollector] document `cloneVar` & `profiler_dump`
2 parents 9fb72f4 + 09ccaf4 commit 2dfcd1e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

profiler.rst

+11
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,12 @@ template access to the collected information::
369369
{
370370
return $this->data['acceptable_content_types'];
371371
}
372+
373+
public function getSomeObject()
374+
{
375+
// use the cloneVar() method to dump collected data in the profiler
376+
return $this->cloneVar($this->data['method']);
377+
}
372378
}
373379

374380
In the simplest case, you want to display the information in the toolbar
@@ -472,6 +478,11 @@ must also define additional blocks:
472478
<td>{{ type }}</td>
473479
</tr>
474480
{% endfor %}
481+
482+
{# use the profiler_dump() function to render the contents of dumped objects #}
483+
<tr>
484+
{{ profiler_dump(collector.someObject) }}
485+
</tr>
475486
</table>
476487
{% endblock %}
477488

0 commit comments

Comments
 (0)