public function TopController::build in MongoDB 8.2
Controller.
Parameters
\Symfony\Component\HttpFoundation\Request $request: The current request.
string $type: The type of top report to produce.
Return value
array A render array.
1 string reference to 'TopController::build'
- mongodb_watchdog.routing.yml in modules/
mongodb_watchdog/ mongodb_watchdog.routing.yml - modules/mongodb_watchdog/mongodb_watchdog.routing.yml
File
- modules/
mongodb_watchdog/ src/ Controller/ TopController.php, line 75
Class
- TopController
- The Top403/Top404 controllers.
Namespace
Drupal\mongodb_watchdog\ControllerCode
public function build(Request $request, string $type) : array {
$top = $this
->getTop();
$rows = $this
->getRowData($request, $type);
$main = empty($rows) ? $this
->buildEmpty($this
->t('No "%type" message found', [
'%type' => $type,
])) : $this
->buildMainTable($rows);
$ret = $this
->buildDefaults($main, $top);
return $ret;
}