public function articleDoiAction($doi) { $repo = $this->getDoctrine()->getRepository('OjsJournalBundle:Article'); $articles = $repo->findBy(['doi' => $doi]); $article = null; if (count($articles) > 0) { $article = $articles[0]; } $this->throw404IfNotFound($article); $this->throw404IfNotFound($article->getIssue()); return $this->redirectToRoute('ojs_article_page', ['slug' => $article->getJournal()->getSlug(), 'article_id' => $article->getId(), 'issue_id' => $article->getIssue()->getId()]); }