mirror of
https://github.com/SuiteCRM/SuiteCRM-Core.git
synced 2025-08-29 21:00:39 +08:00
Add non-grouped navigation tabs legacy handler
This commit is contained in:
parent
cad4ee309c
commit
0b575752b5
1 changed files with 19 additions and 1 deletions
|
@ -2,12 +2,30 @@
|
||||||
|
|
||||||
namespace SuiteCRM\Core\Legacy;
|
namespace SuiteCRM\Core\Legacy;
|
||||||
|
|
||||||
|
use RuntimeException;
|
||||||
|
use TabController;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class Navbar
|
* Class Navbar
|
||||||
* @package SuiteCRM\Core\Legacy
|
* @package SuiteCRM\Core\Legacy
|
||||||
*/
|
*/
|
||||||
class Navbar extends LegacyHandler
|
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
|
* @return array
|
||||||
*/
|
*/
|
||||||
|
@ -75,6 +93,6 @@ class Navbar extends LegacyHandler
|
||||||
return $userActionMenu[] = array_merge($userActionMenu, $last);
|
return $userActionMenu[] = array_merge($userActionMenu, $last);
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new \RuntimeException('Running legacy entry point failed');
|
throw new RuntimeException('Running legacy entry point failed');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue