Bundle/BlogBundle/Controller/BlogController.php
public function articlesAction(Request $request, BasePage $blog, $articleLocale = null)
    {
        $articles = $this->getDoctrine()
            ->getRepository(Article::class)
            ->getArticles($blog);

        return new Response($this->container->get('templating')->render(
            $this->getBaseTemplatePath().':Tabs/_articles.html.twig',
            [
                'locale'    => $articleLocale ? $articleLocale : $request->getLocale(),
                'blog'      => $blog,
                'articles'  => $articles,
            ]
        ));
    }
public function articlesAction(Request $request, BasePage $blog, $articleLocale = null)
    {
        $articles = $this->getDoctrine()
            ->getRepository(Article::class)
            ->getArticles($blog);

        return new Response($this->container->get('templating')->render(
            $this->getBaseTemplatePath().':Tabs/_articles.html.twig',
            [
                'locale'    => $articleLocale ? $articleLocale : $request->getLocale(),
                'blog'      => $blog,
                'articles'  => $articles,
            ]
        ));
    }
public function articlesAction ( Request $ request , BasePage $ blog , $ articleLocale = null ) { $ articles = $ this -> getDoctrine ( ) -> getRepository ( Article :: class ) -> getArticles ( $ blog ) ; return new Response ( $ this -> container -> get ( 'templating' ) -> render ( $ this -> getBaseTemplatePath ( ) . ':Tabs/_articles.html.twig' , [ 'locale' => $ articleLocale ? $ articleLocale : $ request -> getLocale ( ) , 'blog' => $ blog , 'articles' => $ articles , ] ) ) ; }
List Blog articles.

@param Request  $request
@param BasePage $blog

@Route("/{id}/articles/{articleLocale}", name="victoire_blog_articles")
@ParamConverter("blog", class="VictoirePageBundle:BasePage")

@throws \InvalidArgumentException

@return Response
List Blog articles .