Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
100.00% covered (success)
100.00%
7 / 7
100.00% covered (success)
100.00%
1 / 1
CRAP
100.00% covered (success)
100.00%
1 / 1
Pagination
100.00% covered (success)
100.00%
7 / 7
100.00% covered (success)
100.00%
1 / 1
1
100.00% covered (success)
100.00%
1 / 1
 __construct
100.00% covered (success)
100.00%
7 / 7
100.00% covered (success)
100.00%
1 / 1
1
1<?php
2namespace Apie\HtmlBuilders\Components\Resource;
3
4use Apie\Core\Datalayers\Lists\PaginatedResult;
5use Apie\Core\Entities\EntityInterface;
6use Apie\HtmlBuilders\Components\BaseComponent;
7
8class Pagination extends BaseComponent
9{
10    /**
11     * @param PaginatedResult<EntityInterface> $paginatedResult
12     */
13    public function __construct(PaginatedResult $paginatedResult)
14    {
15        parent::__construct([
16            'totalCount' => $paginatedResult->totalCount,
17            'pageNumber' => $paginatedResult->pageNumber,
18            'pageSize' => $paginatedResult->pageSize,
19            'shownCount' => $paginatedResult->list->count(),
20            'querySearch' => $paginatedResult->querySearch,
21        ]);
22    }
23}