N°4756 DBObject Rename Event* methods to FireEvent*

This commit is contained in:
Pierre Goiffon
2023-02-10 15:22:33 +01:00
parent e63d66aa5d
commit ca72ec736e
2 changed files with 24 additions and 25 deletions

View File

@@ -26,7 +26,6 @@ use Combodo\iTop\Application\UI\Base\Component\Html\HtmlFactory;
use Combodo\iTop\Application\UI\Base\Component\Input\InputUIBlockFactory;
use Combodo\iTop\Application\UI\Base\Component\Input\Select\SelectOptionUIBlockFactory;
use Combodo\iTop\Application\UI\Base\Component\Input\SelectUIBlockFactory;
use Combodo\iTop\Application\UI\Base\Component\MedallionIcon\MedallionIcon;
use Combodo\iTop\Application\UI\Base\Component\Panel\PanelUIBlockFactory;
use Combodo\iTop\Application\UI\Base\Component\PopoverMenu\PopoverMenu;
use Combodo\iTop\Application\UI\Base\Component\PopoverMenu\PopoverMenuItem\JsPopoverMenuItem;
@@ -5737,7 +5736,7 @@ JS
* @inheritDoc
* @since 3.1.0
*/
final protected function EventCheckToWrite(): void
final protected function FireEventCheckToWrite(): void
{
$this->FireEvent(EVENT_DB_CHECK_TO_WRITE);
}
@@ -5746,7 +5745,7 @@ JS
* @inheritDoc
* @since 3.1.0
*/
final protected function EventCreateDone(): void
final protected function FireEventCreateDone(): void
{
$this->FireEvent(EVENT_DB_CREATE_DONE);
}
@@ -5759,7 +5758,7 @@ JS
* @inheritDoc
* @since 3.1.0
*/
final protected function EventUpdateDone(array $aChanges): void
final protected function FireEventUpdateDone(array $aChanges): void
{
$this->FireEvent(EVENT_DB_UPDATE_DONE, ['changes' => $aChanges]);
}
@@ -5772,7 +5771,7 @@ JS
* @inheritDoc
* @since 3.1.0
*/
final protected function EventCheckToDelete(DeletionPlan $oDeletionPlan): void
final protected function FireEventCheckToDelete(DeletionPlan $oDeletionPlan): void
{
$this->FireEvent(EVENT_DB_CHECK_TO_DELETE, ['deletion_plan' => $oDeletionPlan]);
}
@@ -5781,7 +5780,7 @@ JS
* @inheritDoc
* @since 3.1.0
*/
final protected function EventDeleteDone(): void
final protected function FireEventDeleteDone(): void
{
$this->FireEvent(EVENT_DB_DELETE_DONE);
}
@@ -5790,7 +5789,7 @@ JS
* @inheritDoc
* @throws \CoreException
*/
final protected function EventComputeValues(): void
final protected function FireEventComputeValues(): void
{
$this->FireEvent(EVENT_DB_COMPUTE_VALUES);
}
@@ -5799,7 +5798,7 @@ JS
* @inheritDoc
* @throws \CoreException
*/
final protected function EventArchive(): void
final protected function FireEventArchive(): void
{
$this->FireEvent(EVENT_DB_ARCHIVE);
}
@@ -5808,7 +5807,7 @@ JS
* @inheritDoc
* @throws \CoreException
*/
final protected function EventUnArchive(): void
final protected function FireEventUnArchive(): void
{
$this->FireEvent(EVENT_DB_UNARCHIVE);
}

View File

@@ -1084,7 +1084,7 @@ abstract class DBObject implements iDisplay
if ($aCallInfo["function"] != "ComputeValues") continue;
return; //skip!
}
$this->EventComputeValues();
$this->FireEventComputeValues();
$this->ComputeValues();
}
@@ -2361,7 +2361,7 @@ abstract class DBObject implements iDisplay
// Ultimate check - ensure DB integrity
$this->SetReadOnly('No modification allowed during CheckToCreate');
$this->EventCheckToWrite();
$this->FireEventCheckToWrite();
$this->SetReadWrite();
$this->DoCheckToWrite();
@@ -3067,7 +3067,7 @@ abstract class DBObject implements iDisplay
MetaModel::StartReentranceProtection($this);
try {
$this->EventCreateDone();
$this->FireEventCreateDone();
$this->AfterInsert();
// Activate any existing trigger
@@ -3349,7 +3349,7 @@ abstract class DBObject implements iDisplay
$this->m_aModifiedAtt = array();
$bModifiedByUpdateDone = false;
try {
$this->EventUpdateDone($aChanges);
$this->FireEventUpdateDone($aChanges);
$this->AfterUpdate();
// Save the status as it is reset just after...
$bModifiedByUpdateDone = $this->IsModified();
@@ -3710,7 +3710,7 @@ abstract class DBObject implements iDisplay
}
}
$this->EventDeleteDone();
$this->FireEventDeleteDone();
$this->AfterDelete();
@@ -4847,7 +4847,7 @@ abstract class DBObject implements iDisplay
}
// Check the node itself
$this->m_aDeleteIssues = array(); // Ok
$this->EventCheckToDelete($oDeletionPlan);
$this->FireEventCheckToDelete($oDeletionPlan);
$this->DoCheckToDelete($oDeletionPlan);
$oDeletionPlan->SetDeletionIssues($this, $this->m_aDeleteIssues, $this->m_bSecurityIssue);
@@ -5603,7 +5603,7 @@ abstract class DBObject implements iDisplay
$this->DBWriteArchiveFlag(true);
$this->m_aCurrValues['archive_flag'] = true;
$this->m_aOrigValues['archive_flag'] = true;
$this->EventArchive();
$this->FireEventArchive();
}
/**
@@ -5617,7 +5617,7 @@ abstract class DBObject implements iDisplay
$this->m_aOrigValues['archive_flag'] = false;
$this->m_aCurrValues['archive_date'] = null;
$this->m_aOrigValues['archive_date'] = null;
$this->EventUnArchive();
$this->FireEventUnArchive();
}
@@ -5897,7 +5897,7 @@ abstract class DBObject implements iDisplay
* @return void
* @since 3.1.0
*/
protected function EventCheckToWrite(): void
protected function FireEventCheckToWrite(): void
{
}
@@ -5905,7 +5905,7 @@ abstract class DBObject implements iDisplay
* @return void
* @since 3.1.0
*/
protected function EventCreateDone(): void
protected function FireEventCreateDone(): void
{
}
@@ -5917,7 +5917,7 @@ abstract class DBObject implements iDisplay
* @return void
* @since 3.1.0
*/
protected function EventUpdateDone(array $aChanges): void
protected function FireEventUpdateDone(array $aChanges): void
{
}
@@ -5929,7 +5929,7 @@ abstract class DBObject implements iDisplay
* @return void
* @since 3.1.0
*/
protected function EventCheckToDelete(DeletionPlan $oDeletionPlan): void
protected function FireEventCheckToDelete(DeletionPlan $oDeletionPlan): void
{
}
@@ -5937,7 +5937,7 @@ abstract class DBObject implements iDisplay
* @return void
* @since 3.1.0
*/
protected function EventDeleteDone(): void
protected function FireEventDeleteDone(): void
{
}
@@ -5945,7 +5945,7 @@ abstract class DBObject implements iDisplay
* @return void
* @since 3.1.0
*/
protected function EventComputeValues(): void
protected function FireEventComputeValues(): void
{
}
@@ -5953,7 +5953,7 @@ abstract class DBObject implements iDisplay
* @return void
* @since 3.1.0
*/
protected function EventArchive(): void
protected function FireEventArchive(): void
{
}
@@ -5962,7 +5962,7 @@ abstract class DBObject implements iDisplay
* @return void
* @since 3.1.0
*/
protected function EventUnArchive(): void
protected function FireEventUnArchive(): void
{
}
}