N°7118 - Act on guaranteed object deletion, with the object still accessible (EVENT_DB_ABOUT_TO_DELETE)

This commit is contained in:
Eric Espie
2024-01-05 11:21:59 +01:00
parent fad5571d9b
commit 18887bf7f9
4 changed files with 42 additions and 2 deletions

View File

@@ -4106,6 +4106,8 @@ abstract class DBObject implements iDisplay
return;
}
$this->SetReadOnly("No modification allowed before delete");
$this->FireEventAboutToDelete();
$oKPI = new ExecutionKPI();
$this->OnDelete();
$oKPI->ComputeStatsForExtension($this, 'OnDelete');
@@ -6625,6 +6627,14 @@ abstract class DBObject implements iDisplay
{
}
/**
* @return void
* @since 3.1.2
*/
protected function FireEventAboutToDelete(): void
{
}
/**
* @return void
* @since 3.1.0