< Ocs-server‎ | Gfx4
Revision as of 11:26, 23 May 2016 by Snizzo (talk | contribs) (Created page with "Gfx provides a nice class for paginating results from a database. This is useful when we want to show our users results in multiple pages. '''It currently works with Bootstrap...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Gfx provides a nice class for paginating results from a database. This is useful when we want to show our users results in multiple pages. It currently works with Bootstrap classes.

Brief example:

<?php
$jobs = new EModel('gfx_jobs');
$jobs->add_condition('person='.EUser::id());

$paginator = new EPaginator($jobs);

$results = $paginator->get_results();

var_dump($results); //echoing results
 
echo $paginator->get_links(); //printing paginator
?>

Note: it's currently indipendent from database implementation as long as there's a working EModel driver.


This page was last edited on 23 May 2016, at 11:26. Content is available under Creative Commons License SA 4.0 unless otherwise noted.