From 0b575752b5d8ab5c1a39efe104ddac7784c12da4 Mon Sep 17 00:00:00 2001 From: Dillon-Brown Date: Tue, 31 Dec 2019 13:08:46 +0000 Subject: [PATCH] Add non-grouped navigation tabs legacy handler --- core/legacy/Navbar.php | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/core/legacy/Navbar.php b/core/legacy/Navbar.php index 25d483434..a9676942d 100644 --- a/core/legacy/Navbar.php +++ b/core/legacy/Navbar.php @@ -2,12 +2,30 @@ namespace SuiteCRM\Core\Legacy; +use RuntimeException; +use TabController; + /** * Class Navbar * @package SuiteCRM\Core\Legacy */ class Navbar extends LegacyHandler { + /** + * @return array + */ + public function getNonGroupedNavTabs(): array + { + if ($this->runLegacyEntryPoint()) { + require LEGACY_PATH . 'modules/MySettings/TabController.php'; + $tabArray = (new TabController())->get_tabs($GLOBALS['current_user']); + + return $tabArray[0]; + } + + throw new RuntimeException('Running legacy entry point failed'); + } + /** * @return array */ @@ -75,6 +93,6 @@ class Navbar extends LegacyHandler return $userActionMenu[] = array_merge($userActionMenu, $last); } - throw new \RuntimeException('Running legacy entry point failed'); + throw new RuntimeException('Running legacy entry point failed'); } }