info.php

Go to the documentation of this file.
00001 <?php
00002 
00007 class Info extends oxUBase
00008 {
00013     protected $_oDelList = null;
00014 
00019     protected $_oDelSetList = null;
00020 
00026     protected $_iViewIndexState = VIEW_INDEXSTATE_NOINDEXNOFOLLOW;
00027 
00038     public function info()
00039     {
00040         // assign template name
00041         $sTplName = oxConfig::getParameter( 'tpl');
00042         $sTplName = $sTplName ? $sTplName : oxSession::getVar( 'infotpl' );
00043 
00044         if ( $sTplName ) {
00045             // security fix so that you cant access files from outside template dir
00046             $sTplName = basename( $sTplName );
00047             oxSession::setVar( 'infotpl', $sTplName );
00048         }
00049 
00050         $this->_sThisTemplate = $sTplName;
00051     }
00052 
00053 
00064     public function render()
00065     {
00066         parent::render();
00067 
00068         if ( !$this->getTemplateName() ) {
00069             //  get default page
00070             $oContent = oxNew( 'oxcontent' );
00071             $oContent->loadByIdent( 'oximpressum' );
00072             $this->_aViewData['oContent'] = $oContent;
00073             $this->_aViewData['tpl'] = $oContent->getId();
00074             $this->_sThisTemplate = 'content.tpl';
00075         } else {
00076             $this->_aViewData['tpl'] = $this->getTemplateName();
00077         }
00078 
00079         $this->_aViewData['deliverylist']    = $this->getDeliveryList();
00080         $this->_aViewData['deliverysetlist'] = $this->getDeliverySetList();;
00081 
00082         return $this->_sThisTemplate;
00083     }
00084 
00090     public function getTemplateName()
00091     {
00092         return $this->_sThisTemplate;
00093     }
00094 
00100     public function getDeliveryList()
00101     {
00102         if ( $this->_oDelList === null ) {
00103             $this->_oDelList = oxNew( 'oxdeliverylist' );
00104             $this->_oDelList->getList();
00105         }
00106         return $this->_oDelList;
00107     }
00108 
00114     public function getDeliverySetList()
00115     {
00116         if ( $this->_oDelSetList === null ) {
00117             $this->_oDelSetList = oxNew( 'oxdeliverysetlist' );
00118             $this->_oDelSetList->getList();
00119         }
00120         return $this->_oDelSetList;
00121     }
00122 }