public function index(array $params)
 {
     $people = new PeopleTable();
     $page = !empty($_GET['page']) ? (int) $_GET['page'] : 1;
     $users = $people->find(['user_account' => true], null, 20, $page);
     return new \Application\Views\Users\ListView(['users' => $users]);
 }
 public function index(array $params)
 {
     $table = new PeopleTable();
     $page = !empty($_GET['page']) ? (int) $_GET['page'] : 1;
     $people = $table->find(null, null, 20, $page);
     return new \Application\Views\People\ListView(['people' => $people]);
 }
 public function index()
 {
     $table = new PeopleTable();
     $people = $table->find(null, null, true);
     $page = !empty($_GET['page']) ? (int) $_GET['page'] : 1;
     $people->setCurrentPageNumber($page);
     $people->setItemCountPerPage(20);
     $this->template->blocks[] = new Block('people/list.inc', ['people' => $people]);
     $this->template->blocks[] = new Block('pageNavigation.inc', ['paginator' => $people]);
 }