コード例 #1
0
ファイル: Widget.php プロジェクト: piratevn/cms-gio
 public function getAction()
 {
     $categoryId = $this->getParam('category_id');
     $category = Modules_Category_Services_Category::getById($categoryId);
     $this->view->category = $category;
     $limit = $this->getParam('limit', 5);
     $latestArticles = Modules_News_Services_Article::getLatestArticle($categoryId, $limit);
     $this->view->articles = $latestArticles;
 }
コード例 #2
0
ファイル: Widget.php プロジェクト: piratevn/cms-gio
 public function showAction()
 {
     $categoryId = (int) $this->getParam('category_id');
     $category = Modules_Category_Services_Category::getById($categoryId);
     $this->view->category = $category;
     $limit = $this->getParam('limit', 5);
     $articles = Modules_News_Services_Article::getLatestArticle($categoryId, $limit);
     $this->view->articles = $articles;
     $style = $this->getParam('style');
     $this->view->style = $style;
 }