當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DataExtension::onAfterDelete方法代碼示例

本文整理匯總了PHP中DataExtension::onAfterDelete方法的典型用法代碼示例。如果您正苦於以下問題:PHP DataExtension::onAfterDelete方法的具體用法?PHP DataExtension::onAfterDelete怎麽用?PHP DataExtension::onAfterDelete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DataExtension的用法示例。


在下文中一共展示了DataExtension::onAfterDelete方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: onAfterDelete

 public function onAfterDelete()
 {
     parent::onAfterDelete();
     // an actual delete vs draft delete
     if (!$this->owner->hasExtension('Versioned')) {
         if ($this->owner->MasterNode == SiteConfig::current_site_config()->SystemID) {
             SyncroDelete::record_delete($this->owner);
         }
     }
 }
開發者ID:nyeholt,項目名稱:silverstripe-syncrotron,代碼行數:10,代碼來源:SyncroableExtension.php

示例2: onAfterDelete

 /**
  *	Determine whether link mappings need to be updated when removing this page.
  */
 public function onAfterDelete()
 {
     parent::onAfterDelete();
     // Determine whether this page has been completely removed.
     if (Config::inst()->get('MisdirectionRequestFilter', 'replace_default') && !$this->owner->isPublished() && $this->owner->getIsDeletedFromStage()) {
         // Convert any link mappings that are directly associated with this page.
         $mappings = LinkMapping::get()->filter(array('RedirectType' => 'Page', 'RedirectPageID' => $this->owner->ID));
         foreach ($mappings as $mapping) {
             $mapping->RedirectType = 'Link';
             $mapping->RedirectLink = Director::makeRelative($this->owner->Link() === Director::baseURL() ? Controller::join_links(Director::baseURL(), 'home/') : $this->owner->Link());
             $mapping->write();
         }
     }
 }
開發者ID:helpfulrobot,項目名稱:nglasl-silverstripe-misdirection,代碼行數:17,代碼來源:SiteTreeMisdirectionExtension.php

示例3: onAfterDelete

 /**
  * Removes the object from the search index after it has been deleted.
  */
 function onAfterDelete()
 {
     ZendSearchLuceneWrapper::delete($this->owner);
     parent::onAfterDelete();
 }
開發者ID:helpfulrobot,項目名稱:asecondwill-lucene,代碼行數:8,代碼來源:ZendSearchLuceneSearchable.php

示例4: onAfterDelete

 /**
  *	Update the fusion tag to remove this tag type.
  */
 public function onAfterDelete()
 {
     parent::onAfterDelete();
     $fusion = FusionTag::get()->byID($this->owner->FusionTagID);
     $types = unserialize($fusion->TagTypes);
     unset($types[$this->owner->ClassName]);
     $fusion->TagTypes = !empty($types) ? serialize($types) : null;
     $fusion->write();
 }
開發者ID:nglasl,項目名稱:silverstripe-fusion,代碼行數:12,代碼來源:FusionExtension.php

示例5: onAfterDelete

 /**
  * Delete the attributed shopping cart if existant.
  *
  * @return void
  *
  * @author Sascha Koehler <skoehler@pixeltricks.de>
  * @since 10.10.2011
  */
 public function onAfterDelete()
 {
     parent::onAfterDelete();
     if ($this->owner->SilvercartShoppingCartID !== null) {
         $cart = DataObject::get_by_id('SilvercartShoppingCart', $this->owner->SilvercartShoppingCartID);
         if ($cart) {
             $cart->delete();
         }
     }
 }
開發者ID:silvercart,項目名稱:silvercart,代碼行數:18,代碼來源:SilvercartCustomer.php

示例6: onAfterDelete

 function onAfterDelete()
 {
     parent::onAfterDelete();
     $this->cleaningUpVariationData();
 }
開發者ID:TouchtechLtd,項目名稱:silverstripe-ecommerce_product_variation,代碼行數:5,代碼來源:ProductWithVariationDecorator.php


注:本文中的DataExtension::onAfterDelete方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。