Ocs-server/Gfx4/Paginator
Appearance
< Ocs-server | Gfx4
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.