From f43f4f1050f56f0a2c6c3cf527eb0779e3355027 Mon Sep 17 00:00:00 2001 From: paul121 Date: Wed, 16 Dec 2020 15:23:52 -0800 Subject: [PATCH] Define the plans and logs dashboard groups. --- modules/ui/views/farm_ui_views.module | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/modules/ui/views/farm_ui_views.module b/modules/ui/views/farm_ui_views.module index a58e2719..3996c83a 100644 --- a/modules/ui/views/farm_ui_views.module +++ b/modules/ui/views/farm_ui_views.module @@ -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(). */