PHP code example of pkshetlie / pagination-bundle
1. Go to this page and download the library: Download pkshetlie/pagination-bundle library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
pkshetlie / pagination-bundle example snippets
class DummyController extends Controller{
public function indexAction(Request $request){
$qb = $this->getDoctrine()->getReposiitory('DummyBundle:DummyEntity')->createQueryBuilder('x');
// you can add some
/*
$qb->orderBy( ... )
$qb->where( ... )
...
*/
$pagination = $this->get('pkshetlie.pagination')->process($qb, $request);
return $this->render('DummyBundle:Dummy:index.html.twig',[
'pagination'=> $pagination,
]);
}
}
php
[
...
new Pkshetlie\PaginationBundle\PaginationBundle(),
...
]