当前位置: 首页>>代码示例>>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;未经允许,请勿转载。