You are here

protected function DetailController::buildMainTable in MongoDB 8.2

Build the main table.

Parameters

\Drupal\mongodb_watchdog\Event[] $events: The event data.

\Drupal\mongodb_watchdog\EventTemplate $eventTemplate: The template for which to built the detail lines.

Return value

array A render array for the main table.

1 call to DetailController::buildMainTable()
DetailController::build in modules/mongodb_watchdog/src/Controller/DetailController.php
Controller.

File

modules/mongodb_watchdog/src/Controller/DetailController.php, line 89

Class

DetailController
The controller for the event detail page.

Namespace

Drupal\mongodb_watchdog\Controller

Code

protected function buildMainTable(array $events, EventTemplate $eventTemplate) : array {
  $ret = [
    '#attributes' => new Attribute([
      'class' => 'mongodb_watchdog__detail',
    ]),
    '#caption' => $this
      ->t('Event occurrences'),
    '#header' => $this
      ->buildMainTableHeader(),
    '#rows' => $this
      ->buildMainTableRows($events, $eventTemplate),
    '#type' => 'table',
  ];
  return $ret;
}