mirror of
https://github.com/Combodo/iTop.git
synced 2026-05-19 15:22:17 +02:00
N°4756 - Ease extensibility for CRUD operations : Pass DeletionPlan to EVENT_DB_CHECK_TO_DELETE
This commit is contained in:
@@ -5754,9 +5754,9 @@ JS
|
|||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
* @since 3.1.0
|
* @since 3.1.0
|
||||||
*/
|
*/
|
||||||
final protected function EventUpdateDone(array $aData): void
|
final protected function EventUpdateDone(array $aChanges): void
|
||||||
{
|
{
|
||||||
$this->FireEvent(EVENT_DB_UPDATE_DONE, $aData);
|
$this->FireEvent(EVENT_DB_UPDATE_DONE, ['changes' => $aChanges]);
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////
|
//////////////
|
||||||
@@ -5767,9 +5767,9 @@ JS
|
|||||||
* @inheritDoc
|
* @inheritDoc
|
||||||
* @since 3.1.0
|
* @since 3.1.0
|
||||||
*/
|
*/
|
||||||
final protected function EventCheckToDelete(): void
|
final protected function EventCheckToDelete(DeletionPlan $oDeletionPlan): void
|
||||||
{
|
{
|
||||||
$this->FireEvent(EVENT_DB_CHECK_TO_DELETE);
|
$this->FireEvent(EVENT_DB_CHECK_TO_DELETE, ['deletion_plan' => $oDeletionPlan]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -3363,7 +3363,7 @@ abstract class DBObject implements iDisplay
|
|||||||
$this->m_aModifiedAtt = array();
|
$this->m_aModifiedAtt = array();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$this->EventUpdateDone(['changes' => $aChanges]);
|
$this->EventUpdateDone($aChanges);
|
||||||
$this->AfterUpdate();
|
$this->AfterUpdate();
|
||||||
|
|
||||||
// Reset original values although the object has not been reloaded
|
// Reset original values although the object has not been reloaded
|
||||||
@@ -4861,7 +4861,7 @@ abstract class DBObject implements iDisplay
|
|||||||
}
|
}
|
||||||
// Check the node itself
|
// Check the node itself
|
||||||
$this->m_aDeleteIssues = array(); // Ok
|
$this->m_aDeleteIssues = array(); // Ok
|
||||||
$this->EventCheckToDelete();
|
$this->EventCheckToDelete($oDeletionPlan);
|
||||||
$this->DoCheckToDelete($oDeletionPlan);
|
$this->DoCheckToDelete($oDeletionPlan);
|
||||||
$oDeletionPlan->SetDeletionIssues($this, $this->m_aDeleteIssues, $this->m_bSecurityIssue);
|
$oDeletionPlan->SetDeletionIssues($this, $this->m_aDeleteIssues, $this->m_bSecurityIssue);
|
||||||
|
|
||||||
@@ -5987,7 +5987,7 @@ abstract class DBObject implements iDisplay
|
|||||||
* @return void
|
* @return void
|
||||||
* @since 3.1.0
|
* @since 3.1.0
|
||||||
*/
|
*/
|
||||||
protected function EventUpdateDone(array $aData): void
|
protected function EventUpdateDone(array $aChanges): void
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -5999,7 +5999,7 @@ abstract class DBObject implements iDisplay
|
|||||||
* @return void
|
* @return void
|
||||||
* @since 3.1.0
|
* @since 3.1.0
|
||||||
*/
|
*/
|
||||||
protected function EventCheckToDelete(): void
|
protected function EventCheckToDelete(DeletionPlan $oDeletionPlan): void
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user