public function executeListArticle(sfWebRequest $request) { $this->categories = CategoryPeer::getActiveCategories(); $this->current_category = CategoryPeer::retrieveByPK($request->getParameter('id')); $this->forward404If(!$this->current_category); $this->articles = ArticlePeer::getActiveArticles($this->current_category->getId()); $this->paths = array(); $this->paths[] = array('text' => $this->current_category->getName(), 'link' => $this->getController()->genUrl('sophiaStore/listArticle?id=' . $this->current_category->getId())); $pager = new sfPropelPager('Article', 10); $pager->setCriteria(new Criteria()); $pager->setPage($this->getRequestParameter('page', 1)); $pager->init(); $this->pager = $pager; }