register.php

Go to the documentation of this file.
00001 <?php
00002 
00007 class Register extends User
00008 {
00014     protected $_sThisTemplate = 'register.tpl';
00015 
00021     protected $_sSuccessTemplate = 'register_success.tpl';
00022 
00028     protected $_aMustFillFields = null;
00029 
00036     protected $_iViewIndexState = 1;
00037 
00044     public function render()
00045     {
00046         parent::render();
00047 
00048         // checking registration status
00049         if ( $this->getRegistrationStatus() ) {
00050 
00051             //for older templates
00052             $this->_aViewData['error']   = $this->getRegistrationError();
00053             $this->_aViewData['success'] = $this->getRegistrationStatus();
00054 
00055             return $this->_sSuccessTemplate;
00056         }
00057 
00058         $this->_aViewData['aMustFillFields'] = $this->getMustFillFields();
00059 
00060         return $this->_sThisTemplate;
00061     }
00062 
00068     public function getRegistrationError()
00069     {
00070         return oxConfig::getParameter( 'newslettererror' );
00071     }
00072 
00078     public function getRegistrationStatus()
00079     {
00080         return oxConfig::getParameter( 'success' );
00081     }
00082 
00088     public function getMustFillFields()
00089     {
00090         if ( $this->_aMustFillFields === null ) {
00091             $this->_aMustFillFields = false;
00092 
00093             // passing must-be-filled-fields info
00094             $aMustFillFields = $this->getConfig()->getConfigParam( 'aMustFillFields' );
00095             if ( is_array( $aMustFillFields ) ) {
00096                 $this->_aMustFillFields = array_flip( $aMustFillFields );
00097             }
00098         }
00099         return $this->_aMustFillFields;
00100     }
00101 }

Generated on Thu Dec 4 12:04:57 2008 for OXID eShop CE by  doxygen 1.5.5