render('default/index.html.twig'); } #[Route('/home', name: 'app_home')] public function home(Request $req, EntityManagerInterface $emi, #[CurrentUser()] ?User $user): Response { $this->denyAccessUnlessGranted('IS_AUTHENTICATED_FULLY'); $last4Notes = $emi->getRepository(Note::class)->getLast4Notes($user); return $this->render('default/home.html.twig', [ 'last4Notes' => $last4Notes, 'isAdmin' => $this->isGranted('ROLE_ADMIN'), ]); } #[Route('/reference-editor', name: 'app_reference_editor')] public function referenceEditor(EntityManagerInterface $emi): Response { $this->denyAccessUnlessGranted('ROLE_ADMIN'); $creeds = $emi->getRepository(Reference::class)->findByType('creed'); $belgic = $emi->getRepository(Reference::class)->findByType('belgic'); $heidelberg = $emi->getRepository(Reference::class)->findByType('heidelberg'); $dort = $emi->getRepository(Reference::class)->findByType('dort'); $wcf = $emi->getRepository(Reference::class)->findByType('wcf'); $wsc = $emi->getRepository(Reference::class)->findByType('wsc'); $wlc = $emi->getRepository(Reference::class)->findByType('wlc'); return $this->render('editors/reference-editor.html.twig', [ 'creeds' => $creeds, 'belgic' => $belgic, 'heidelberg' => $heidelberg, 'dort' => $dort, 'wcf' => $wcf, 'wsc' => $wsc, 'wlc' => $wlc ]); } #[Route('/template-editor', name: 'app_template_editor')] public function templateEditor(): Response { $this->denyAccessUnlessGranted('IS_AUTHENTICATED_FULLY'); return $this->render('editors/template-editor.html.twig'); } }