本文整理汇总了PHP中DataObject::onBeforeDelete方法的典型用法代码示例。如果您正苦于以下问题:PHP DataObject::onBeforeDelete方法的具体用法?PHP DataObject::onBeforeDelete怎么用?PHP DataObject::onBeforeDelete使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataObject
的用法示例。
在下文中一共展示了DataObject::onBeforeDelete方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: onBeforeDelete
public function onBeforeDelete()
{
parent::onBeforeDelete();
// delete related records ...
DB::query("DELETE FROM OpenStackImplementationApiCoverageDraft where ReleaseSupportedApiVersionID = {$this->ID};");
DB::query("DELETE FROM OpenStackImplementationApiCoverage where ReleaseSupportedApiVersionID = {$this->ID};");
}
示例2: onBeforeDelete
protected function onBeforeDelete()
{
parent::onBeforeDelete();
foreach ($this->Questions() as $q) {
$q->delete();
}
}
示例3: onBeforeDelete
protected function onBeforeDelete()
{
if ($this->ArchiveID && ($archive = $this->Archive())) {
$archive->delete();
}
parent::onBeforeDelete();
}
示例4: onBeforeDelete
public function onBeforeDelete()
{
if (file_exists($this->getFullPath())) {
unlink($this->getFullPath());
}
parent::onBeforeDelete();
}
示例5: onBeforeDelete
/**
* Delete all connected Widgets when this WidgetArea gets deleted
*/
public function onBeforeDelete()
{
parent::onBeforeDelete();
foreach ($this->Widgets() as $widget) {
$widget->delete();
}
}
示例6: onBeforeDelete
public function onBeforeDelete()
{
parent::onBeforeDelete();
foreach ($this->Children() as $term) {
$term->delete();
}
}
示例7: onBeforeDelete
public function onBeforeDelete()
{
parent::onBeforeDelete();
foreach ($this->Providers() as $Provider) {
$Provider_ > delete();
}
}
示例8: onBeforeDelete
/**
* Ensure all the stock is removed when we remove the warehouse
*
* @return void
*/
public function onBeforeDelete()
{
parent::onBeforeDelete();
foreach ($this->StockedProducts() as $stock) {
$stock->delete();
}
}
示例9: onBeforeDelete
public function onBeforeDelete()
{
parent::onBeforeDelete();
foreach ($this->Options() as $option) {
$option->delete();
}
}
示例10: onBeforeDelete
/**
* Before delete logic
*/
protected function onBeforeDelete()
{
parent::onBeforeDelete();
foreach ($this->Tasks() as $task) {
$task->delete();
}
}
示例11: onBeforeDelete
protected function onBeforeDelete()
{
parent::onBeforeDelete();
foreach ($this->SampleConfigurations() as $item) {
$item->delete();
}
}
示例12: onBeforeDelete
protected function onBeforeDelete()
{
parent::onBeforeDelete();
foreach ($this->RelatedNotes() as $item) {
$item->delete();
}
$this->OpenStackComponents()->removeAll();
}
示例13: onBeforeDelete
/**
* Don't let current or active config be deleted.
*
* @throws ValidationException
*/
public function onBeforeDelete()
{
parent::onBeforeDelete();
$currentConfig = self::streak_config();
if ($this->isInDB() && $currentConfig && $currentConfig->ID == $this->ID) {
throw new ValidationException("Can't delete only or active config, please make another active config before deleting this one.");
}
}
示例14: onBeforeDelete
public function onBeforeDelete()
{
parent::onBeforeDelete();
$deleted = new TypeformSubmission_Deleted();
$deleted->TypeformID = $this->TypeformID;
$deleted->ParentID = $this->ParentID;
$deleted->write();
}
示例15: onBeforeDelete
/**
* Before we delete this form make sure we delete all the
* field values so that we don't leave old data round
*
*/
protected function onBeforeDelete() {
if($this->FieldValues()) {
foreach($this->FieldValues() as $value) {
$value->delete();
}
}
parent::onBeforeDelete();
}