Total Complexity | 2 |
Total Lines | 19 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
8 | class SetSelectedDataStep extends AbstractStep |
||
9 | { |
||
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 | } |
||
23 | |||
24 | public function requiresBefore() |
||
27 | } |
||
28 | |||
29 | } |