function DashboardController::restCollectorAction
Exposes collector's data as JSON.
Parameters
\Symfony\Component\HttpKernel\Profiler\Profile $profile:
$collector:
Return value
\Symfony\Component\HttpFoundation\JsonResponse
1 string reference to 'DashboardController::restCollectorAction'
- webprofiler.routing.yml in webprofiler/
webprofiler.routing.yml - webprofiler/webprofiler.routing.yml
File
-
webprofiler/
src/ Controller/ DashboardController.php, line 236
Class
- DashboardController
- Class DashboardController
Namespace
Drupal\webprofiler\ControllerCode
public function restCollectorAction(Profile $profile, $collector) {
$this->profiler
->disable();
$data = $profile->getCollector($collector)
->getData();
return new JsonResponse([
'data' => $data,
]);
}