public function indexAction() { $this->getLayout()->getAdminHmenu()->add($this->getTranslator()->trans('menuArticle'), array('action' => 'index')); $articleMapper = new ArticleMapper(); if ($this->getRequest()->getPost('action') == 'delete' && $this->getRequest()->getPost('check_articles')) { foreach ($this->getRequest()->getPost('check_articles') as $articleId) { $articleMapper->delete($articleId); } } $articles = $articleMapper->getArticleList(''); $this->getView()->set('articleMapper', $articleMapper); $this->getView()->set('articles', $articles); $this->getView()->set('multilingual', (bool) $this->getConfig()->get('multilingual_acp')); $this->getView()->set('contentLanguage', $this->getConfig()->get('content_language')); }
public function render() { $articleMapper = new ArticleMapper(); $this->getView()->set('articles', $articleMapper->getArticleList('', 5)); }