Ejemplo n.º 1
0
 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'));
 }
Ejemplo n.º 2
0
 public function render()
 {
     $articleMapper = new ArticleMapper();
     $this->getView()->set('articles', $articleMapper->getArticleList('', 5));
 }