You are here

protected function DetailController::buildMainTableRows in MongoDB 8.2

Build the main table rows.

Parameters

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

\Drupal\mongodb_watchdog\EventTemplate $eventTemplate: The template for these events.

Return value

string[array|string] A render array for a table.

Throws

\Drupal\Core\Entity\EntityMalformedException

1 call to DetailController::buildMainTableRows()
DetailController::buildMainTable in modules/mongodb_watchdog/src/Controller/DetailController.php
Build the main table.

File

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

Class

DetailController
The controller for the event detail page.

Namespace

Drupal\mongodb_watchdog\Controller

Code

protected function buildMainTableRows(array $events, EventTemplate $eventTemplate) : array {
  $rows = [];
  foreach ($events as $event) {

    // @todo bring this back from "model": it is a display method.
    $rows[] = $this->eventController
      ->asTableRow($eventTemplate, $event);
  }
  return $rows;
}