本文整理匯總了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);
}
}
}
示例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();
}
示例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();
}
示例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();
}
}
}
示例6: onAfterDelete
function onAfterDelete()
{
parent::onAfterDelete();
$this->cleaningUpVariationData();
}
開發者ID:TouchtechLtd,項目名稱:silverstripe-ecommerce_product_variation,代碼行數:5,代碼來源:ProductWithVariationDecorator.php