help.php

Go to the documentation of this file.
00001 <?php
00002 
00009 class Help extends oxUBase
00010 {
00015     protected $_sThisTemplate = 'help.tpl';
00016 
00021     protected $_sHelpText = null;
00022 
00028     protected $_iViewIndexState = VIEW_INDEXSTATE_NOINDEXNOFOLLOW;
00029 
00039     public function render()
00040     {
00041         $this->_aViewData["helptext"] = $this->getHelpText();
00042 
00043         parent::render();
00044 
00045         return $this->_sThisTemplate;
00046     }
00047 
00053     public function getHelpText()
00054     {
00055         if ( $this->_sHelpText === null ) {
00056             $this->_sHelpText = false;
00057             $sLang = oxLang::getInstance()->getTplLanguage();
00058             $sTpl  = basename( oxConfig::getParameter( 'tpl' ) );
00059             $sHelpPage = $sTpl?$sTpl:oxConfig::getParameter( 'page' );
00060 
00061             $sHelpText = null;
00062             $sHelpPath = getShopBasePath()."help/{$sLang}/{$sHelpPage}.inc.tpl";
00063             if ( $sHelpPage && is_readable( $sHelpPath ) ) {
00064                 $sHelpText = file_get_contents( $sHelpPath );
00065             }
00066 
00067             if ( !$sHelpText ) {
00068                 $sHelpPath = getShopBasePath()."help/{$sLang}/default.inc.tpl";
00069                 if ( is_readable( $sHelpPath ) ) {
00070                     $sHelpText = file_get_contents( $sHelpPath );
00071                 }
00072             }
00073 
00074             if ( $sHelpText ) {
00075                 $this->_sHelpText = $sHelpText;
00076             }
00077         }
00078         return $this->_sHelpText;
00079     }
00080 }

Generated on Wed Apr 22 12:26:31 2009 for OXID eShop CE by  doxygen 1.5.5