Go to the documentation of this file.00001 <?php
00002
00003
00004 require_once 'oxerptype.php';
00005
00009 class oxERPType_Artextends extends oxERPType
00010 {
00016 public function __construct()
00017 {
00018 parent::__construct();
00019 $this->_sTableName = 'oxartextends';
00020 }
00021
00031 protected function _preSaveObject($oShopObject, $aData)
00032 {
00033 return true;
00034 }
00035
00044 public function saveObject($aData, $blAllowCustomShopId)
00045 {
00046 $oShopObject = oxNew('oxi18n');
00047 $oShopObject->init('oxartextends');
00048 $oShopObject->setLanguage( 0 );
00049 $oShopObject->setEnableMultilang(false);
00050
00051 foreach ($aData as $key => $value) {
00052
00053 $sUPKey = strtoupper($key);
00054 if (!isset($aData[$sUPKey])) {
00055 unset($aData[$key]);
00056 $aData[$sUPKey] = $value;
00057 }
00058 }
00059
00060
00061 $blLoaded = false;
00062 if ($aData['OXID']) {
00063 $blLoaded = $oShopObject->load( $aData['OXID']);
00064 }
00065
00066 $aData = $this->_preAssignObject( $oShopObject, $aData, $blAllowCustomShopId );
00067
00068 if ($blLoaded) {
00069 $this->checkWriteAccess($oShopObject, $aData);
00070 } else {
00071 $this->checkCreateAccess($aData);
00072 }
00073
00074 $oShopObject->assign( $aData );
00075
00076 if ($blAllowCustomShopId) {
00077 $oShopObject->setIsDerived(false);
00078 }
00079
00080 if ($this->_preSaveObject($oShopObject, $aData)) {
00081
00082 if ( $oShopObject->save()) {
00083 return $this->_postSaveObject($oShopObject, $aData);
00084 }
00085 }
00086
00087 return false;
00088 }
00089 }