Conditions | 1 |
Paths | 1 |
Total Lines | 12 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
10 | public function execute() |
||
11 | { |
||
12 | /** @var Pagerfanta $paginator */ |
||
13 | $paginator = $this->getFromResponse('paginator'); |
||
14 | $responseData = [ |
||
15 | 'rows' => $paginator->getCurrentPageResults(), |
||
16 | 'total' => $paginator->getNbResults(), |
||
17 | 'current_page' => $paginator->getCurrentPage(), |
||
18 | 'total_pages' => $paginator->getNbPages() |
||
19 | ]; |
||
20 | |||
21 | $this->createResponse(['response_data' => $responseData]); |
||
22 | } |
||
29 | } |