src/ShopBundle/objects/db/TShopOrderStep/TShopStepUserDataCore.class.php
protected function &LoadNewsletterSignup()
    {
        if (is_null($this->oNewsletterSignup)) {
            $this->oNewsletterSignup = TdbPkgNewsletterUser::GetNewInstance();
            $oNewslettter = &TdbPkgNewsletterUser::GetInstanceForActiveUser();
            if (!is_null($oNewslettter)) {
                $this->oNewsletterSignup = $oNewslettter;
            }

            $oGlobal = TGlobal::instance();
            if ($oGlobal->UserDataExists(self::INPUT_DATA_NAME)) {
                $aData = $oGlobal->GetUserData(self::INPUT_DATA_NAME);
                if (is_array($aData)) {
                    //            $aData['id'] = $this->oNewsletterSignup->id;
                    $aData = $this->CreateNewsletterArry($aData);
                    $this->oNewsletterSignup->LoadFromRowProtected($aData);
                    if ('1' == $aData['optin']) {
                        $this->oNewsletterSignup->sqlData['optin'] = '1';
                        $this->oNewsletterSignup->sqlData['optin_date'] = date('Y-m-d H:i:s');
                        $this->oNewsletterSignup->sqlData['signup_date'] = date('Y-m-d H:i:s');
                    }
                }
            }
        }

        return $this->oNewsletterSignup;
    }
protected function &LoadNewsletterSignup()
    {
        if (is_null($this->oNewsletterSignup)) {
            $this->oNewsletterSignup = TdbPkgNewsletterUser::GetNewInstance();
            $oNewslettter = &TdbPkgNewsletterUser::GetInstanceForActiveUser();
            if (!is_null($oNewslettter)) {
                $this->oNewsletterSignup = $oNewslettter;
            }

            $oGlobal = TGlobal::instance();
            if ($oGlobal->UserDataExists(self::INPUT_DATA_NAME)) {
                $aData = $oGlobal->GetUserData(self::INPUT_DATA_NAME);
                if (is_array($aData)) {
                    //            $aData['id'] = $this->oNewsletterSignup->id;
                    $aData = $this->CreateNewsletterArry($aData);
                    $this->oNewsletterSignup->LoadFromRowProtected($aData);
                    if ('1' == $aData['optin']) {
                        $this->oNewsletterSignup->sqlData['optin'] = '1';
                        $this->oNewsletterSignup->sqlData['optin_date'] = date('Y-m-d H:i:s');
                        $this->oNewsletterSignup->sqlData['signup_date'] = date('Y-m-d H:i:s');
                    }
                }
            }
        }

        return $this->oNewsletterSignup;
    }
protected function & LoadNewsletterSignup ( ) { if ( is_null ( $ this -> oNewsletterSignup ) ) { $ this -> oNewsletterSignup = TdbPkgNewsletterUser :: GetNewInstance ( ) ; $ oNewslettter = & TdbPkgNewsletterUser :: GetInstanceForActiveUser ( ) ; if ( ! is_null ( $ oNewslettter ) ) { $ this -> oNewsletterSignup = $ oNewslettter ; } $ oGlobal = TGlobal :: instance ( ) ; if ( $ oGlobal -> UserDataExists ( self :: INPUT_DATA_NAME ) ) { $ aData = $ oGlobal -> GetUserData ( self :: INPUT_DATA_NAME ) ; if ( is_array ( $ aData ) ) { //            $aData['id'] = $this->oNewsletterSignup->id; $ aData = $ this -> CreateNewsletterArry ( $ aData ) ; $ this -> oNewsletterSignup -> LoadFromRowProtected ( $ aData ) ; if ( '1' == $ aData [ 'optin' ] ) { $ this -> oNewsletterSignup -> sqlData [ 'optin' ] = '1' ; $ this -> oNewsletterSignup -> sqlData [ 'optin_date' ] = date ( 'Y-m-d H:i:s' ) ; $ this -> oNewsletterSignup -> sqlData [ 'signup_date' ] = date ( 'Y-m-d H:i:s' ) ; } } } } return $ this -> oNewsletterSignup ; }
lazzy load newsletter object.

@return TdbPkgNewsletterUser
lazzy load newsletter object .