Define the plans and logs dashboard groups.

This commit is contained in:
paul121 2020-12-16 15:23:52 -08:00 committed by Michael Stenta
parent 1e639cdd8c
commit f43f4f1050
1 changed files with 21 additions and 0 deletions

View File

@ -42,6 +42,27 @@ function farm_ui_views_local_tasks_alter(&$local_tasks) {
}
}
/**
* Implements hook_farm_dashboard_groups().
*/
function farm_ui_views_farm_dashboard_groups() {
$groups = [];
// If the plan module is enabled, add a plans group.
if (\Drupal::service('module_handler')->moduleExists('plan')) {
$groups['second']['plans'] = [
'#weight' => 10,
];
}
// Add a logs group.
$groups['first']['logs'] = [
'#weight' => 10,
];
return $groups;
}
/**
* Implements hook_farm_dashboard_panes().
*/