From 33397ec4675dcf1bb69aee0eb7119d8a3d77e208 Mon Sep 17 00:00:00 2001 From: Francisco Facioni Date: Wed, 13 Jun 2012 13:40:41 -0300 Subject: [PATCH] Added to the documentation how to paginate with knp paginator --- README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/README.md b/README.md index aabe3d7..c544bb1 100644 --- a/README.md +++ b/README.md @@ -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