final class PaginationComponent (View source)

Methods

fromArray(array $items, int|null $page = null, int|null $perPage = null, string $pageName = 'page', string|null $basePath = null, array|null $query = null)
fromQueryBuilder(QueryBuilder $builder, int|null $page = null, int|null $perPage = null, string $pageName = 'page', string|null $basePath = null, array|null $query = null)
string
string

Details

__construct

__construct(PaginationFactory $factory, PaginationRenderer $renderer)

No description

Parameters

PaginationFactory $factory
PaginationRenderer $renderer

fromArray

PaginationResult fromArray(array $items, int|null $page = null, int|null $perPage = null, string $pageName = 'page', string|null $basePath = null, array|null $query = null)

No description

Parameters

array $items
int|null $page
int|null $perPage
string $pageName
string|null $basePath
array|null $query

Return Value

PaginationResult

fromQueryBuilder

PaginationResult fromQueryBuilder(QueryBuilder $builder, int|null $page = null, int|null $perPage = null, string $pageName = 'page', string|null $basePath = null, array|null $query = null)

No description

Parameters

QueryBuilder $builder
int|null $page
int|null $perPage
string $pageName
string|null $basePath
array|null $query

Return Value

PaginationResult

render

string render(PaginationResult|PaginationState|null $pagination)

No description

Parameters

PaginationResult|PaginationState|null $pagination

Return Value

string