projectService = $projectService; $this->menuService = $menuService; } /** * Displays the project hub for the current user. */ public function get(): Response { $clientId = (isset($_GET['client']) === true && $_GET['client'] != '') ? (int) $_GET['client'] : null; $hubData = $this->projectService->getProjectHubData(session('userdata.id'), $clientId); $this->tpl->assign('projectTypeAvatars', $this->menuService->getProjectTypeAvatars()); $this->tpl->assign('currentClientName', $hubData['currentClientName']); $this->tpl->assign('currentClient', $hubData['currentClient']); $this->tpl->assign('clients', $hubData['clients']); $this->tpl->assign('allProjects', $hubData['allProjects']); return $this->tpl->display('projects.projectHub'); } }