You are here

protected function Redirect404SensorPlugin::buildTableHeader in Monitoring 8

Builds the header for a table based on rows.

Do not override this method to define a static header.

Parameters

array $rows: The array of rows for which a header will be built.

Return value

array $header The associative header array for the table.

Overrides DatabaseAggregatorSensorPlugin::buildTableHeader

File

src/Plugin/monitoring/SensorPlugin/Redirect404SensorPlugin.php, line 74

Class

Redirect404SensorPlugin
Monitors 404 error requests.

Namespace

Drupal\monitoring\Plugin\monitoring\SensorPlugin

Code

protected function buildTableHeader($rows = []) {
  $header = parent::buildTableHeader($rows);
  if (isset($header['path'])) {
    $header['path'] = $this
      ->t('Path');
    $header['count'] = $this
      ->t('Count');
    $header['daily_count'] = $this
      ->t('Daily count');
    $header['timestamp'] = $this
      ->t('Last access');
  }
  return $header;
}