/**
* Renders a profiler panel for the given token.
*
* @throws NotFoundHttpException
*/
public function panelAction(Request
$request, string
$token): Response
{ $this->
denyAccessIfProfilerDisabled();
$this->cspHandler?->
disableCsp();
$panel =
$request->query->
get('panel'
);
$page =
$request->query->
get('page', 'home'
);
if ('latest' ===
$token &&
$latest =
current($this->profiler->
find(null, null, 1, null, null, null
))) { $token =
$latest['token'
];
} if (!
$profile =
$this->profiler->
loadProfile($token)) { return $this->
renderWithCspNonces($request, '@WebProfiler/Profiler/info.html.twig',
['about' => 'no_token', 'token' =>
$token, 'request' =>
$request]);
}