当前位置: 首页>>代码示例>>PHP>>正文


PHP oxBase::delete方法代码示例

本文整理汇总了PHP中oxBase::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP oxBase::delete方法的具体用法?PHP oxBase::delete怎么用?PHP oxBase::delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在oxBase的用法示例。


在下文中一共展示了oxBase::delete方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: delete

 /**
  * Override delete function so we can delete user group and article or category relations first.
  *
  * @param string $sOxId object ID (default null)
  *
  * @return null
  */
 public function delete($sOxId = null)
 {
     if (!$sOxId) {
         $sOxId = $this->getId();
     }
     $this->unsetDiscountRelations();
     $this->unsetUserGroups();
     $this->deleteVoucherList();
     return parent::delete($sOxId);
 }
开发者ID:mibexx,项目名称:oxid_yttutorials,代码行数:17,代码来源:oxvoucherserie.php

示例2: delete

 /**
  * Deletes object information from DB, returns true on success.
  *
  * @param string $sOxId object ID (default null)
  *
  * @return bool
  */
 public function delete($sOxId = null)
 {
     if (!$sOxId) {
         $sOxId = $this->getId();
     }
     if (!$sOxId) {
         return false;
     }
     $blDeleted = parent::delete($sOxId);
     if ($blDeleted) {
         $oDb = oxDb::getDb();
         $sDelete = "delete from oxobject2group where oxobject2group.oxshopid = '" . $this->getShopId() . "' and oxobject2group.oxobjectid = " . $oDb->quote($sOxId);
         $oDb->execute($sDelete);
     }
     return $blDeleted;
 }
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:23,代码来源:oxnewsletter.php

示例3: delete

 /**
  * Deletes oxFile record from DB, removes orphan files.
  *
  * @param string $sOxId default null
  *
  * @return bool
  */
 public function delete($sOxId = null)
 {
     $sOxId = $sOxId ? $sOxId : $this->getId();
     $this->load($sOxId);
     // if record cannot be delete, abort deletion
     if ($blDeleted = parent::delete($sOxId)) {
         $this->_deleteFile();
     }
     return $blDeleted;
 }
开发者ID:mibexx,项目名称:oxid_yttutorials,代码行数:17,代码来源:oxfile.php

示例4: delete

 /**
  * Deletes order article object. If deletion succeded - updates
  * article stock information. Returns deletion status
  *
  * @param string $sOXID Article id
  *
  * @return bool
  */
 public function delete($sOXID = null)
 {
     if ($blDelete = parent::delete($sOXID)) {
         $myConfig = $this->getConfig();
         if ($this->oxorderarticles__oxstorno->value != 1) {
             $this->updateArticleStock($this->oxorderarticles__oxamount->value, $myConfig->getConfigParam('blAllowNegativeStock'));
         }
     }
     return $blDelete;
 }
开发者ID:Alpha-Sys,项目名称:oxideshop_ce,代码行数:18,代码来源:OrderArticle.php

示例5: delete

 /**
  * Removes articles from the recommlist and deletes list
  *
  * @param string $sOXID Object ID(default null)
  *
  * @return bool
  */
 public function delete($sOXID = null)
 {
     if (!$sOXID) {
         $sOXID = $this->getId();
     }
     if (!$sOXID) {
         return false;
     }
     if ($blDelete = parent::delete($sOXID)) {
         $oDb = oxDb::getDb();
         // cleaning up related data
         $oDb->execute("delete from oxobject2list where oxlistid = " . $oDb->quote($sOXID));
     }
     return $blDelete;
 }
开发者ID:JulianaSchuster,项目名称:oxid-frontend,代码行数:22,代码来源:oxrecommlist.php

示例6: delete

 /**
  * Deletes current basket history
  *
  * @param string $sOXID Object ID(default null)
  *
  * @return bool
  */
 public function delete($sOXID = null)
 {
     if (!$sOXID) {
         $sOXID = $this->getId();
     }
     $blDelete = false;
     if ($sOXID && ($blDelete = parent::delete($sOXID))) {
         // cleaning up related data
         $oDb = oxDb::getDb();
         $sQ = "delete from oxuserbasketitems where oxbasketid = " . $oDb->quote($sOXID);
         $oDb->execute($sQ);
     }
     return $blDelete;
 }
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:21,代码来源:oxuserbasket.php

示例7: delete

 /**
  * Delete this object from the database, returns true on success.
  *
  * @param string $sOXID Object ID(default null)
  *
  * @return bool
  */
 public function delete($sOXID = null)
 {
     $blDeleted = parent::delete($sOXID);
     if ($blDeleted) {
         $oDB = oxDb::getDb();
         $sOXID = $oDB->quote($sOXID);
         //delete the record
         foreach ($this->_getLanguageSetTables() as $sSetTbl) {
             $oDB->execute("delete from {$sSetTbl} where oxid = {$sOXID}");
         }
     }
     return $blDeleted;
 }
开发者ID:Crease29,项目名称:oxideshop_ce,代码行数:20,代码来源:I18n.php

示例8: delete

 /**
  * Removes user data stored in some DB tables (such as oxuserpayments, oxaddress
  * oxobject2group, oxremark, etc). Return true on success.
  *
  * @param string $sOXID object ID (default null)
  *
  * @return bool
  */
 public function delete($sOXID = null)
 {
     if (!$sOXID) {
         $sOXID = $this->getId();
     }
     if (!$sOXID) {
         return false;
     }
     $blDeleted = parent::delete($sOXID);
     if ($blDeleted) {
         $oDb = oxDb::getDb();
         $sOXIDQuoted = $oDb->quote($sOXID);
         // deleting stored payment, address, group dependencies, remarks info
         $oDb->execute("delete from oxaddress where oxaddress.oxuserid = {$sOXIDQuoted}");
         $oDb->execute("delete from oxobject2group where oxobject2group.oxobjectid = {$sOXIDQuoted}");
         // deleting notice/wish lists
         $oDb->execute("delete oxuserbasketitems.* from oxuserbasketitems, oxuserbaskets where oxuserbasketitems.oxbasketid = oxuserbaskets.oxid and oxuserid = {$sOXIDQuoted}");
         $oDb->execute("delete from oxuserbaskets where oxuserid = {$sOXIDQuoted}");
         // deleting newsletter subscription
         $oDb->execute("delete from oxnewssubscribed where oxuserid = {$sOXIDQuoted}");
         // delivery and delivery sets
         $oDb->execute("delete from oxobject2delivery where oxobjectid = {$sOXIDQuoted}");
         // discounts
         $oDb->execute("delete from oxobject2discount where oxobjectid = {$sOXIDQuoted}");
         $this->deleteAdditionally($sOXIDQuoted);
         // and leaving all order related information
         $rs = $oDb->execute("delete from oxremark where oxparentid = {$sOXIDQuoted} and oxtype !='o'");
         $blDeleted = $rs->EOF;
     }
     return $blDeleted;
 }
开发者ID:Alpha-Sys,项目名称:oxideshop_ce,代码行数:39,代码来源:User.php

示例9: delete

 /**
  * Updates stock information, deletes current ordering details from DB,
  * returns true on success.
  *
  * @param string $sOxId Ordering ID (default null)
  *
  * @return bool
  */
 public function delete($sOxId = null)
 {
     if ($sOxId) {
         if (!$this->load($sOxId)) {
             // such order does not exist
             return false;
         }
     } elseif (!$sOxId) {
         $sOxId = $this->getId();
     }
     // no order id is passed
     if (!$sOxId) {
         return false;
     }
     // delete order articles
     $oOrderArticles = $this->getOrderArticles(false);
     foreach ($oOrderArticles as $oOrderArticle) {
         $oOrderArticle->delete();
     }
     // #440 - deleting user payment info
     if ($oPaymentType = $this->getPaymentType()) {
         $oPaymentType->delete();
     }
     return parent::delete($sOxId);
 }
开发者ID:Alpha-Sys,项目名称:oxideshop_ce,代码行数:33,代码来源:Order.php

示例10: delete

 /**
  * Delete this object from the database, returns true on success.
  *
  * @param string $oxid Object ID(default null)
  *
  * @return bool
  */
 public function delete($oxid = null)
 {
     $deleted = parent::delete($oxid);
     if ($deleted) {
         $db = oxDb::getDb();
         $oxid = $db->quote($oxid);
         //delete the record
         foreach ($this->_getLanguageSetTables() as $setTbl) {
             $db->execute("delete from {$setTbl} where oxid = {$oxid}");
         }
     }
     return $deleted;
 }
开发者ID:Alpha-Sys,项目名称:oxideshop_ce,代码行数:20,代码来源:MultiLanguageModel.php


注:本文中的oxBase::delete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。