refactor(Cis Menu): changes method name and checks if the CIS4_MENU_ENTRY constant is defined

This commit is contained in:
SimonGschnell
2024-11-04 13:39:13 +01:00
parent 86ee48888a
commit eafbdcfffe
3 changed files with 14 additions and 3 deletions
@@ -31,7 +31,8 @@ class CisVue extends FHC_Controller
public function Menu()
{
$this->load->model('content/Content_model', 'ContentModel');
$result = $this->ContentModel->getMenu(defined('CIS4_MENU_ENTRY') ? CIS4_MENU_ENTRY : null, get_uid());
$menu_contentID = $this->ContentModel->getMenuContentID();
$result = $this->ContentModel->getMenu($menu_contentID, get_uid());
$menu = getData($result) ?? (object)['childs' => []];
$this->outputJsonSuccess($menu);