getSession()->get('fgforceconnect') && !$this->getUser()) { return $this->redirectToRoute('app_login'); } $em->getRepository("App\Entity\Item")->getUserItems($this->getUser(), $bookmarks, $items, $itemscategorys); return $this->render('Home/page.html.twig', [ 'useheader' => true, 'usemenu' => false, 'usesidebar' => false, 'maxsize' => 1000, 'bookmarks' => $bookmarks, 'items' => $items, 'itemcategorys' => $itemscategorys, ]); if (!$this->getUser()) { return $this->render('Home/home.html.twig', [ 'useheader' => true, 'usemenu' => false, 'usesidebar' => false, 'maxsize' => 1000, ]); } if ($this->getUser()->hasRole('ROLE_USER')) { return $this->redirectToRoute('app_user_home'); } if ($this->getUser()->hasRole('ROLE_MANAGER')) { return $this->redirectToRoute('app_manager_home'); } if ($this->getUser()->hasRole('ROLE_MASTER')) { return $this->redirectToRoute('app_master_home'); } if ($this->getUser()->hasRole('ROLE_MODO')) { return $this->redirectToRoute('app_modo_home'); } if ($this->getUser()->hasRole('ROLE_ADMIN')) { return $this->redirectToRoute('app_admin_home'); } } public function homeuser($access): Response { return $this->render('Home/home.html.twig', [ 'useheader' => true, 'usemenu' => false, 'usesidebar' => false, 'maxsize' => 1000, ]); } public function homemaster($access): Response { return $this->render('Home/home.html.twig', [ 'useheader' => true, 'usemenu' => false, 'usesidebar' => false, 'maxsize' => 1000, ]); } public function homemanager($access): Response { return $this->redirectToRoute('app_manager_user'); } public function homemodo($access): Response { return $this->redirectToRoute('app_modo_niveau02'); } public function homeadmin($access): Response { return $this->redirectToRoute('app_admin_config'); } public function docrest(): Response { return $this->render('Home/docrest.html.twig', [ 'useheader' => true, 'usemenu' => false, 'usesidebar' => true, ]); } }