| @@ 24-34 (lines=11) @@ | ||
| 21 | * @Route("/users", name="admin_users") |
|
| 22 | * @Method("GET") |
|
| 23 | */ |
|
| 24 | public function usersAction(Request $request) |
|
| 25 | { |
|
| 26 | $users = $this->getDoctrine()->getRepository('AppBundle:User')->findAll(); |
|
| 27 | $paginator = $this->get('knp_paginator'); |
|
| 28 | $pagination = $paginator->paginate( |
|
| 29 | $users, |
|
| 30 | $request->query->getInt('page', 1), |
|
| 31 | 10 |
|
| 32 | ); |
|
| 33 | return $this->render('@App/admin/user/users.html.twig', array('pagination' => $pagination)); |
|
| 34 | } |
|
| 35 | ||
| 36 | /** |
|
| 37 | * @Route("/users/managers", name="admin_users_managers") |
|
| @@ 40-50 (lines=11) @@ | ||
| 37 | * @Route("/users/managers", name="admin_users_managers") |
|
| 38 | * @Method("GET") |
|
| 39 | */ |
|
| 40 | public function usersManagersAction(Request $request) |
|
| 41 | { |
|
| 42 | $users = $this->getDoctrine()->getRepository('AppBundle:User')->findByRole('ROLE_MANAGER'); |
|
| 43 | $paginator = $this->get('knp_paginator'); |
|
| 44 | $pagination = $paginator->paginate( |
|
| 45 | $users, |
|
| 46 | $request->query->getInt('page', 1), |
|
| 47 | 10 |
|
| 48 | ); |
|
| 49 | return $this->render('@App/admin/user/users.html.twig', array('pagination' => $pagination)); |
|
| 50 | } |
|
| 51 | ||
| 52 | /** |
|
| 53 | * @Route("/estates/{slug}", name="admin_estates_manager") |
|
| @@ 36-46 (lines=11) @@ | ||
| 33 | * @Route("/estates", name="admin_estates") |
|
| 34 | * @Method("GET") |
|
| 35 | */ |
|
| 36 | public function estatesAction(Request $request) |
|
| 37 | { |
|
| 38 | $estates = $this->getDoctrine()->getRepository('AppBundle:Estate')->findAll(); |
|
| 39 | $paginator = $this->get('knp_paginator'); |
|
| 40 | $pagination = $paginator->paginate( |
|
| 41 | $estates, |
|
| 42 | $request->query->getInt('page', 1), |
|
| 43 | 10 |
|
| 44 | ); |
|
| 45 | return $this->render('@App/admin/estate/estates.html.twig', array('pagination' => $pagination)); |
|
| 46 | } |
|
| 47 | ||
| 48 | /** |
|
| 49 | * @Route("/districts", name="admin_districts") |
|