public function detailAction() { $newsProxy = new SxModule_News_Proxy(); $news = $newsProxy->getById((int) $this->_getParam('id'), $this->_getParam('lng')); //$page = new SxCms_Page(); $pageProxy = new SxCms_Page_Proxy(); $page = $pageProxy->getPageById(242); $this->view->page = $page; $this->view->news = $news; }
public function getNews($type = 'news') { $proxy = new SxModule_News_Proxy(); $this->view->news = $proxy->getAllActive($type, $this->view->lng); }
public function deleteAction() { SxCms_Acl::requireAcl('news', 'news.delete'); $proxy = new SxModule_News_Proxy(); $item = $proxy->getById((int) $this->_getParam('id'), $_SESSION['System']['lng']); if ($item->getId()) { $item->delete(); } $cache = Zend_Registry::get('cache'); $cache->clean(Zend_Cache::CLEANING_MODE_MATCHING_ANY_TAG, array('SxModule_News')); $flashMessenger = $this->_helper->getHelper('FlashMessenger'); $flashMessenger->addMessage($this->admin_tmx->_('newsdeleted')); $this->_helper->redirector->gotoSimple('index', 'news'); }