Conditions | 1 |
Paths | 1 |
Total Lines | 16 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
20 | public function list(ParameterBagInterface $parameterBag, int $page = 1): Response |
||
21 | { |
||
22 | $em = $this->getDoctrine()->getManager(); |
||
23 | $max_per_page = $parameterBag->get("ribs_admin")["paginator_element_per_page"]; |
||
24 | |||
25 | $logs = $em->getRepository(UserLogs::class)->findAllPaginated($page, $max_per_page); |
||
26 | $pagination = array( |
||
27 | "page" => $page, |
||
28 | "page_number" => ceil(count($logs) / 20), |
||
29 | "route" => "ribsadmin_userlogs", |
||
30 | "parameters" => array() |
||
31 | ); |
||
32 | |||
33 | return $this->render("@RibsAdmin/userlogs/list.html.twig", [ |
||
34 | "logs" => $logs, |
||
35 | "pagination" => $pagination |
||
36 | ]); |
||
39 |