Ejemplo n.º 1
0
 /**
  * Sets variables for view of "Archiv" page
  */
 public function renderArchive()
 {
     $news = $this->news->getAll();
     $vp = new \VisualPaginator($this, 'vp');
     $page = $vp->page;
     $paginator = $vp->getPaginator();
     $paginator->setItemCount($news->count());
     $paginator->setItemsPerPage(5);
     $paginator->setPage($page);
     $template = $this->template;
     $template->title = "Archiv aktualit";
     $template->news = $news->limit($paginator->getLength(), $paginator->getOffset());
 }