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'
]);
} /**
* Returns the routing traces associated to the given request.
*/
private function getTraces(RequestDataCollector
$request, string
$method): array
{ $traceRequest = Request::
create( $request->
getPathInfo(),
$request->
getRequestServer(true
)->
get('REQUEST_METHOD'
),