protected function TemporaryFilesUsagesSensorPlugin::getQuery in Monitoring 8
Builds the query for verbose output.
Similar to the aggregate query, but without aggregation.
Return value
\Drupal\Core\Database\Query\Select The select query object.
Overrides DatabaseAggregatorSensorPlugin::getQuery
See also
\Drupal\monitoring\Plugin\monitoring\SensorPlugin\DatabaseAggregatorSensorPlugin::getAggregateQuery()
File
- src/
Plugin/ monitoring/ SensorPlugin/ TemporaryFilesUsagesSensorPlugin.php, line 41
Class
- TemporaryFilesUsagesSensorPlugin
- Monitors temporary files usages.
Namespace
Drupal\monitoring\Plugin\monitoring\SensorPluginCode
protected function getQuery() {
$query = parent::getQuery();
$query
->innerJoin('file_usage', 'fu', 'fu.fid = file_managed.fid');
$query
->groupBy('file_managed.fid');
return $query;
}