| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 40 | public function handle(Event $event): PaginationParameterBag |
||
| 41 | { |
||
| 42 | if (!$this->supports($event)) { |
||
| 43 | throw new UnexpectedEventException($event, ResourceControllerEvent::class); |
||
| 44 | } |
||
| 45 | |||
| 46 | /** @var ResourceGridView $resourceGridView */ |
||
| 47 | $resourceGridView = $event->getSubject(); |
||
|
|
|||
| 48 | |||
| 49 | /** @var Pagerfanta $data */ |
||
| 50 | $data = $resourceGridView->getData(); |
||
| 51 | |||
| 52 | return new PaginationParameterBag($resourceGridView->getRequestConfiguration()->getRequest(), $data->getNbResults(), $data->getMaxPerPage(), $data->getCurrentPage()); |
||
| 53 | } |
||
| 55 |