Added to the documentation how to paginate with knp paginator

This commit is contained in:
Francisco Facioni 2012-06-13 13:40:41 -03:00
parent 0d9e0f1172
commit 33397ec467

View file

@ -302,9 +302,16 @@ You can now use the `foq_elastica.finder.website.user` service:
You can even get paginated results!
Pagerfanta:
/** var Pagerfanta\Pagerfanta */
$userPaginator = $finder->findPaginated('bob');
Knp paginator:
$paginator = $this->get('knp_paginator');
$userPaginator = $paginator->paginate($finder->createPaginatorAdapter('bob'));
##### Index wide finder
You can also define a finder that will work on the entire index. Adjust your index