Exemplo n.º 1
0
 private function initCountOfItems()
 {
     $countOfItems = $this->settingFacade->getSettingValue('menu_tagsCount');
     if ((int) $countOfItems > 0) {
         $this->countOfItems = (int) $countOfItems;
     }
 }
Exemplo n.º 2
0
 protected function beforeRender()
 {
     $postsLimit = (int) $this->settingFacade->getSettingValue('post_itemsPerPage');
     if ($postsLimit > 0) {
         $this->itemsPerPage = $postsLimit;
     }
     $posts = $this->posts;
     $paginator = $this['paginator']->getPaginator();
     $paginator->itemsPerPage = $this->itemsPerPage;
     $paginator->itemCount = count($posts);
     if (is_array($posts) and count($posts)) {
         $posts = $this->getItemsPerPage($posts, $paginator->offset);
     }
     $this->template->posts = $posts;
 }