From f97b4d3a22e4907a113c2f51a44c43830dbd81e3 Mon Sep 17 00:00:00 2001
From: ebremner <ebremner@uwaterloo.ca>
Date: Tue, 1 Dec 2020 13:44:03 -0500
Subject: [PATCH] ISTWCMS-4199: updating uwGetMenu function to use new syntax

---
 uw_fdsu_theme_resp.theme | 10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

diff --git a/uw_fdsu_theme_resp.theme b/uw_fdsu_theme_resp.theme
index 03726dbe..5aaf36d3 100644
--- a/uw_fdsu_theme_resp.theme
+++ b/uw_fdsu_theme_resp.theme
@@ -101,17 +101,11 @@ function uw_fdsu_theme_resp_preprocess_region(&$variables) {
   // (i.e. faculty colour and get the correct class here).
   if ($region == "header") {
 
-    // Get the main menu from the uwService.
-    $main_menu = \Drupal::service('uw_cfg_common.uw_service')->uwGetMenu('main', TRUE);
-
-    // Get the secondary menu (which is the information menu) from the uwService.
-    $secondary_menu = \Drupal::service('uw_cfg_common.uw_service')->uwGetMenu('uw-menu-audience-menu', TRUE);
-
     // Set the main menu variable.
-    $variables['main_menu'] = $main_menu;
+    $variables['main_menu'] = \Drupal::service('uw_cfg_common.uw_service')->uwGetMenu('main', TRUE, TRUE);
 
     // Set the secondary menu variable.
-    $variables['secondary_menu'] = $secondary_menu;
+    $variables['secondary_menu'] = \Drupal::service('uw_cfg_common.uw_service')->uwGetMenu('uw-menu-audience-menu', TRUE, TRUE);
 
     // The class that is used for the header.
     $variables['classes'][] = 'uw-header';
-- 
GitLab