Newscoop\GimmeBundle\Controller\ArticlesController::getArticlesAction PHP Method

getArticlesAction() public method

Get Articles.
public getArticlesAction ( Request $request ) : array
$request Symfony\Component\HttpFoundation\Request
return array
    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;
    }