本文整理汇总了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();
}