AppBundle\Controller\BlogController::indexAction PHP Метод

indexAction() публичный Метод

public indexAction ( $page )
    public function indexAction($page)
    {
        $query = $this->getDoctrine()->getRepository('AppBundle:Post')->queryLatest();
        $paginator = $this->get('knp_paginator');
        $posts = $paginator->paginate($query, $page, Post::NUM_ITEMS);
        $posts->setUsedRoute('blog_index_paginated');
        return $this->render('blog/index.html.twig', array('posts' => $posts));
    }