Skip to content

[Profiler] [DataCollector] document cloneVar & profiler_dump #18470

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions profiler.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -463,6 +470,11 @@ must also define additional blocks:
<td>{{ type }}</td>
</tr>
{% endfor %}

{# In case of specific object, you can leverage the profiler_dump() function #}
<tr>
{{ profiler_dump(collector.object) }}
</tr>
</table>
{% endblock %}

Expand Down