public function StoreController::overview in Ubercart 8.4
Provide the administration overview page.
Parameters
string $link_id: The ID of the administrative path link for which to display child links.
Return value
array A renderable array of the administration overview page.
Overrides SystemController::overview
1 string reference to 'StoreController::overview'
- uc_store.routing.yml in uc_store/
uc_store.routing.yml - uc_store/uc_store.routing.yml
File
- uc_store/
src/ Controller/ StoreController.php, line 15
Class
- StoreController
- Returns responses for Ubercart store routes.
Namespace
Drupal\uc_store\ControllerCode
public function overview($link_id = 'uc_store.admin.store') {
$build['blocks'] = parent::overview($link_id);
if ($results = $this
->moduleHandler()
->invokeAll('uc_store_status')) {
$map = [
'warning' => REQUIREMENT_WARNING,
'error' => REQUIREMENT_ERROR,
];
foreach ($results as $message) {
$requirements[] = [
'title' => $message['title'],
'description' => $message['desc'],
'severity' => isset($map[$message['status']]) ? $map[$message['status']] : REQUIREMENT_INFO,
];
}
$build['status'] = [
'#theme' => 'status_report',
'#prefix' => '<h2>' . $this
->t('Store status') . '</h2>',
'#requirements' => $requirements,
];
}
return $build;
}