title: Pagination in Symfony2.4.2 With MongoDB
body: <p>Hi Can anyone please let me know how to use pagination in Symfony2.4.2 while i am using MongoDB with symfony.I could not find any good way to do that like in Cakephp we can use its inbuilt component for  Pagination.</p>
  
  <p>Following are my query in controller listing all task from Mongodb.</p>
  
  <pre><code> $documents = $dm-&gt;getRepository('WorkOrganisationBundle:Tasks')-&gt;findAll();
              $counttasks = count($documents);
              return $this-&gt;render('WorkOrganisationBundle:Tasks:index.html.twig', array(
                              'documents' =&gt; $documents                        
                          ));
  </code></pre>
  
  <p>Thanks Advance</p>