コード例 #1
0
 public function commentDeleteAction()
 {
     SxCms_Acl::requireAcl('news', 'news.comments.delete');
     $comment = new SxCms_Comment();
     $comment->setId($this->_getParam('id'));
     $mapper = new SxCms_Comment_DataMapper();
     $mapper->delete($comment);
     $flashMessenger = $this->_helper->getHelper('FlashMessenger');
     $flashMessenger->addMessage($this->admin_tmx->_('messagedeletedsuccess'));
     $this->_helper->redirector->gotoSimple('comments', 'page');
 }
コード例 #2
0
 public function commentsAction()
 {
     $mapper = new SxCms_Comment_DataMapper();
     $page = $this->_getParam('contentpage');
     $this->view->comments = $mapper->getCommentsByPage($page);
 }