You are here

public function SensorImageMissingStyle::buildQuery in Monitoring 7

Builds the database query.

Return value

\SelectQuery

Overrides SensorDatabaseAggregator::buildQuery

File

lib/Drupal/monitoring/Sensor/Sensors/SensorImageMissingStyle.php, line 28
Contains \Drupal\monitoring\Sensor\Sensors\SensorImageMissingStyle.

Class

SensorImageMissingStyle
Monitors image derivate creation errors from dblog.

Namespace

Drupal\monitoring\Sensor\Sensors

Code

public function buildQuery() {

  // Extends the watchdog query.
  $query = parent::buildQuery();
  $query
    ->addField('watchdog', 'variables');
  $query
    ->groupBy('variables');
  $query
    ->orderBy('records_count', 'DESC');
  return $query;
}