vnphp/paginator-bundle

Useful KNP paginator extensions.

Installs: 217

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Forks: 0

pkg:composer/vnphp/paginator-bundle

v0.1 2017-01-11 12:48 UTC

This package is auto-updated.

Last update: 2025-10-14 21:33:02 UTC


README

build status code quality

Installation

composer require vnphp/paginator-bundle

You need to have git installed.

Usage

Add the bundle to your AppKernel.php:

<?php 

$bundles = array(          
            new \Vnphp\PaginatorBundle\VnphpPaginatorBundle(),
        );

Usage

<?php

if ($page > 1) {
    $limit = 20;
    $paginatorOffset = -1;
} else {
    $limit = 19;
    $paginatorOffset = 0;
}

$this->paginator->paginate($query, $page, $limit, [
    'offset' => $paginatorOffset,
]);