| Conditions | 1 |
| Paths | 1 |
| Total Lines | 24 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | public function indexAction(Request $request) |
||
| 14 | { |
||
| 15 | // @todo autowire |
||
| 16 | $postRepository = $this->getDoctrine()->getRepository(Post::class); |
||
| 17 | |||
| 18 | $paginator = $this->get('knp_paginator'); |
||
| 19 | |||
| 20 | $postsPagination = $paginator->paginate( |
||
| 21 | $postRepository->createPublicFeedPostsQuery(), |
||
| 22 | $request->query->getInt('page', 1), |
||
| 23 | self::POSTS_PER_PAGE |
||
| 24 | ); |
||
| 25 | |||
| 26 | return $this->render( |
||
| 27 | 'SkobkinPointToolsBundle:Post:feed.html.twig', |
||
| 28 | [ |
||
| 29 | // @todo Move to translation |
||
| 30 | 'feed_title' => 'All', |
||
| 31 | 'posts' => $postsPagination, |
||
| 32 | // Special feed mark (to not show comments and other) |
||
| 33 | 'is_feed' => true, |
||
| 34 | ] |
||
| 35 | ); |
||
| 36 | } |
||
| 37 | } |
||
| 38 |