news.php

Go to the documentation of this file.
00001 <?php
00002 
00007 class News extends oxUBase
00008 {
00013     protected $_oNewsList = null;
00014 
00019     protected $_sThisTemplate = 'news.tpl';
00020 
00025     protected $_blTop5Action = true;
00026 
00031     protected $_blBargainAction = true;
00032 
00043     public function render()
00044     {
00045         parent::render();
00046 
00047         $this->_aViewData['news'] = $this->getNews();
00048 
00049         // loading actions
00050         $this->_loadActions();
00051 
00052         return $this->_sThisTemplate;
00053     }
00054 
00060     public function getNews()
00061     {
00062         if ( $this->_oNewsList === null ) {
00063             $this->_oNewsList = false;
00064             $oActNews = oxNew( 'oxnewslist' );
00065             $oActNews->loadNews();
00066             if ( count($oActNews) ) {
00067                 $this->_oNewsList = $oActNews;
00068             }
00069         }
00070         return $this->_oNewsList;
00071     }
00072 
00073 }