getModuleManagers(); $dashBoardList = array(); foreach($moduleManagers as $moduleManagerObj){ //Check if this is not an admin module if($moduleManagerObj->getModuleType() != 'admin'){ continue; } $allowed = BaseService::getInstance()->isModuleAllowedForUser($moduleManagerObj); if(!$allowed){ continue; } $item = $moduleManagerObj->getDashboardItem(); if(!empty($item)) { $index = $moduleManagerObj->getDashboardItemIndex(); $dashBoardList[$index] = $item; } } ksort($dashBoardList); $dashboardList1 =[]; $dashboardList2 =[]; foreach($dashBoardList as $k=>$v){ if (count($dashboardList1) === 4 ) { $dashboardList2[] = $v; } else { $dashboardList1[] = $v; } } ?>