本文整理匯總了PHP中DataExtension::onBeforeDelete方法的典型用法代碼示例。如果您正苦於以下問題:PHP DataExtension::onBeforeDelete方法的具體用法?PHP DataExtension::onBeforeDelete怎麽用?PHP DataExtension::onBeforeDelete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類DataExtension
的用法示例。
在下文中一共展示了DataExtension::onBeforeDelete方法的10個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: onBeforeDelete
public function onBeforeDelete()
{
parent::onBeforeDelete();
$avatar = $this->owner->Avatar();
if ($avatar && $avatar->exists()) {
$avatar->delete();
}
}
示例2: onBeforeDelete
/**
* Deletes some relations
*
* @return void
*
* @author Sebastian Diel <sdiel@pixeltricks.de>
* @since 10.05.2012
*/
public function onBeforeDelete()
{
parent::onBeforeDelete();
foreach ($this->getLanguageRelation() as $language) {
$language->delete();
}
}
示例3: onBeforeDelete
/**
* Remove the record from the translation group mapping.
*/
public function onBeforeDelete()
{
// @todo Coupling to Versioned, we need to avoid removing
// translation groups if records are just deleted from a stage
// (="unpublished"). Ideally the translation group tables would
// be specific to different Versioned changes, making this restriction unnecessary.
// This will produce orphaned translation group records for SiteTree subclasses.
if (!$this->owner->hasExtension('Versioned')) {
$this->removeTranslationGroup();
}
parent::onBeforeDelete();
}
示例4: onBeforeDelete
public function onBeforeDelete()
{
$conf = $this->FlexiFormConf();
if ($conf->exists()) {
$conf->delete();
}
return parent::onBeforeDelete();
}
示例5: onBeforeDelete
/**
* Remove the entry from the search table before deleting it
*/
public function onBeforeDelete()
{
parent::onBeforeDelete();
$this->deleteDo($this->owner);
}
示例6: onBeforeDelete
/**
*
*/
public function onBeforeDelete()
{
// delete the cache
CacheHelper::get_cache()->remove($this->key());
parent::onBeforeDelete();
}
示例7: onBeforeDelete
public function onBeforeDelete()
{
parent::onBeforeDelete();
$this->dataChangeTrackService->track($this->owner, 'Delete');
}
示例8: onBeforeDelete
public function onBeforeDelete()
{
if (self::$prevent_delete) {
throw new Exception("Tried to delete a DataObject, but data deletion is currently active");
}
parent::onBeforeDelete();
}
示例9: onBeforeDelete
function onBeforeDelete()
{
parent::onBeforeDelete();
if (Versioned::get_by_stage("Product", "Stage", "Product.ID =" . $this->owner->ID)->count() == 0) {
$variations = $this->owner->Variations();
foreach ($variations as $variation) {
if ($variation->canDelete()) {
$variation->delete();
}
}
}
}
開發者ID:TouchtechLtd,項目名稱:silverstripe-ecommerce_product_variation,代碼行數:12,代碼來源:ProductWithVariationDecorator.php
示例10: onBeforeDelete
/**
* Delete a member's backup tokens when deleting the member.
*/
public function onBeforeDelete()
{
foreach ($this->owner->BackupTokens() as $bt) {
$bt->delete();
}
parent::onBeforeDelete();
}