public function journalPostDetailAction($slug, $journal_slug) { $em = $this->getDoctrine()->getManager(); $journal = $em->getRepository('OjsJournalBundle:Journal')->findOneBy(['slug' => $journal_slug]); $this->throw404IfNotFound($journal); if ($journal->getStatus() !== JournalStatuses::STATUS_PUBLISHED || $journal->getPublisher()->getStatus() !== PublisherStatuses::STATUS_COMPLETE) { $journal = null; $this->throw404IfNotFound($journal); } $post = $em->getRepository('OjsJournalBundle:JournalPost')->findOneBy(['journal' => $journal, 'slug' => $slug]); $this->throw404IfNotFound($post); return $this->render('OjsSiteBundle:JournalCms:post.html.twig', ['post' => $post]); }