saxulum / saxulum-pagination-provider
This package is abandoned and no longer maintained.
No replacement package was suggested.
Saxulum Pagination Provider
2.1.2
2015-12-19 18:01 UTC
Requires
- php: >=5.5.9,<8.0
- knplabs/knp-components: ~1.2,>=1.2.5
- pimple/pimple: >=2.1,<4
- symfony/http-kernel: ~2.3|~3.0
- symfony/translation: ~2.3|~3.0
- twig/twig: ~1.2
Requires (Dev)
- phpunit/phpunit: ~4.0
- silex/api: ~2.0@dev
- silex/providers: ~2.0@dev
- symfony/routing: ~2.3|~3.0
Suggests
- silex/silex: ~1.2
README
works with plain silex-php
## Features
- Does not require initializing specific adapters
- Can be customized in any way needed, etc.: pagination view, event subscribers.
- Possibility to add custom filtering, sorting functionality depending on request parameters.
- Separation of concerns, paginator is responsible for generating the pagination view only, pagination view * for representation purposes.
Requirements
- php: >=5.3.3,
- knplabs/knp-components: ~1.2,>=1.2.5,
- pimple/pimple: ~1.1,
- symfony/http-kernel: ~2.3,
- symfony/translation: ~2.3,
- twig/twig: ~1.2
## Installation
Through Composer as saxulum/saxulum-pagination-provider.
Configuration
$container->register(new Saxulum\PaginationProvider\Silex\Provider\SaxulumPaginationProvider, array(
'knp_paginator.options' => array(
'defaultPaginationOptions' => array(
'pageParameterName' => 'page',
'sortFieldParameterName' => 'sort',
'sortDirectionParameterName' => 'direction',
'filterFieldParameterName' => 'filterField',
'filterValueParameterName' => 'filterValue',
'distinct' => true,
),
'subscriberOptions' => array(
'defaultPaginationTemplate' => '@SaxulumPaginationProvider/sliding.html.twig',
'defaultSortableTemplate' => '@SaxulumPaginationProvider/sortable_link.html.twig',
'defaultFiltrationTemplate' => '@SaxulumPaginationProvider/filtration.html.twig',
'defaultPageRange' => 5,
)
)
));
Usage
$container['knp_paginator']->paginate($target, 1, 10);