Go to the documentation of this file.00001 <?php
00002
00008 class Newsletter_Plain extends oxAdminDetails
00009 {
00010
00018 public function render()
00019 {
00020 parent::render();
00021
00022 $soxId = $this->_aViewData["oxid"] = $this->getEditObjectId();
00023 if ($soxId != "-1" && isset($soxId)) {
00024
00025 $oNewsletter = oxNew("oxnewsletter");
00026 $oNewsletter->load($soxId);
00027 $this->_aViewData["edit"] = $oNewsletter;
00028 }
00029
00030 return "newsletter_plain.tpl";
00031 }
00032
00036 public function save()
00037 {
00038 $soxId = $this->getEditObjectId();
00039 $aParams = oxRegistry::getConfig()->getRequestParameter("editval");
00040
00041
00042 $sShopID = oxRegistry::getSession()->getVariable("actshop");
00043 $aParams['oxnewsletter__oxshopid'] = $sShopID;
00044
00045 $oNewsletter = oxNew("oxnewsletter");
00046 if ($soxId != "-1") {
00047 $oNewsletter->load($soxId);
00048 } else {
00049 $aParams['oxnewsletter__oxid'] = null;
00050 }
00051
00052 $oNewsletter->assign($aParams);
00053 $oNewsletter->save();
00054
00055
00056 $this->setEditObjectId($oNewsletter->getId());
00057 }
00058 }