本文整理汇总了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