public function renderDefault()
 {
     $vp = new Cntrl\VisualPaginator($this, 'paginator');
     $paginator = $vp->getPaginator();
     $paginator->itemsPerPage = 25;
     //FIXME: nastavitelný parametr
     $paginator->itemCount = $this->pictures->countBy();
     $this->template->pictures = $this->pictures->findBy([], ['created' => 'DESC'], $paginator->itemsPerPage, $paginator->offset);
 }
 public function renderDefault()
 {
     $vp = new Cntrl\VisualPaginator($this, 'paginator');
     $paginator = $vp->getPaginator();
     $paginator->itemsPerPage = 10;
     $paginator->itemCount = ITEMCOUNT;
     //see RouterFactory.php
     $posts = $this->posts->findBy(['publish_date <=' => new \DateTime()], ['date' => 'DESC'], $paginator->itemsPerPage, $paginator->offset);
     $this->template->posts = $posts;
 }
Example #3
0
 public function renderUsers()
 {
     $vp = new Cntrl\VisualPaginator($this, 'paginator');
     $paginator = $vp->getPaginator();
     $paginator->itemsPerPage = 25;
     $paginator->itemCount = $this->users->countBy();
     $this->template->users = $this->users->findBy([], [], $paginator->itemsPerPage, $paginator->offset);
 }