if (null ===
$this->profiler
) { throw new NotFoundHttpException('The profiler must be enabled.'
);
} $this->profiler->
disable();
if (null ===
$this->matcher || null ===
$this->routes
) { return new Response('The Router is not enabled.', 200,
['Content-Type' => 'text/html'
]);
} $profile =
$this->profiler->
loadProfile($token);
/** @var RequestDataCollector $request */
$request =
$profile->
getCollector('request'
);
return new Response($this->twig->
render('@WebProfiler/Router/panel.html.twig',
[ 'request' =>
$request,
'router' =>
$profile->
getCollector('router'
),
'traces' =>
$this->
getTraces($request,
$profile->
getMethod()),
]), 200,
['Content-Type' => 'text/html'
]);
}