You are here

protected function ControllerBase::buildDefaults in MongoDB 8.2

The default build() implementation.

Cannot be a build() method because each controller build() has a different signature.

Parameters

array $main: A render array for the main table.

array $top: A render array for the top element present on some controllers results.

Return value

array A render array for the whole controller.

4 calls to ControllerBase::buildDefaults()
DetailController::build in modules/mongodb_watchdog/src/Controller/DetailController.php
Controller.
OverviewController::build in modules/mongodb_watchdog/src/Controller/OverviewController.php
Controller.
RequestController::build in modules/mongodb_watchdog/src/Controller/RequestController.php
Controller.
TopController::build in modules/mongodb_watchdog/src/Controller/TopController.php
Controller.

File

modules/mongodb_watchdog/src/Controller/ControllerBase.php, line 82

Class

ControllerBase
Base controller class for paged reports.

Namespace

Drupal\mongodb_watchdog\Controller

Code

protected function buildDefaults(array $main, array $top) : array {
  $ret = [
    'top' => $top,
  ];
  $ret += [
    'main' => $main,
    'pager' => [
      '#type' => 'pager',
    ],
    '#attached' => [
      'library' => [
        'mongodb_watchdog/styling',
      ],
    ],
  ];
  return $ret;
}