function DatabaseController::getQuery
Parameters
$profile ->getToken():
int $qid:
Return value
array
1 call to DatabaseController::getQuery()
- DatabaseController::explainAction in webprofiler/
src/ Controller/ DatabaseController.php
File
-
webprofiler/
src/ Controller/ DatabaseController.php, line 79
Class
- DatabaseController
- Class DatabaseController
Namespace
Drupal\webprofiler\ControllerCode
private function getQuery(Profile $profile, $qid) {
$this->profiler
->disable();
$token = $profile->getToken();
if (!($profile = $this->profiler
->loadProfile($token))) {
throw new NotFoundHttpException($this->t('Token @token does not exist.', [
'@token' => $token,
]));
}
/** @var DatabaseDataCollector $databaseCollector */
$databaseCollector = $profile->getCollector('database');
$queries = $databaseCollector->getQueries();
$query = $queries[$qid];
return $query;
}