public function getArticlesAction(Request $request) { $em = $this->container->get('em'); $publication = $this->get('newscoop_newscoop.publication_service')->getPublication()->getId(); $articles = $em->getRepository('Newscoop\\Entity\\Article')->getArticles($publication, $request->get('type', null), $request->get('language', null), $request->get('issue', null)); $paginator = $this->get('newscoop.paginator.paginator_service'); $articles = $paginator->paginate($articles, array('distinct' => false)); return $articles; }