EventService: call FireEvent with only one parameter (PSR14)

This commit is contained in:
Eric Espie
2022-03-15 15:41:55 +01:00
parent 964ce44577
commit 8ddaf1b731
8 changed files with 77 additions and 61 deletions

View File

@@ -5,6 +5,7 @@
*/
use Combodo\iTop\Core\MetaModel\FriendlyNameType;
use Combodo\iTop\Service\EventData;
use Combodo\iTop\Service\EventName;
use Combodo\iTop\Service\EventService;
@@ -5806,6 +5807,7 @@ abstract class DBObject implements iDisplay
* @param array $aEventData
*
* @throws \CoreException
* @throws \Exception
*/
public function FireEvent($sEvent, $aEventData = array())
{
@@ -5815,7 +5817,7 @@ abstract class DBObject implements iDisplay
foreach (MetaModel::EnumParentClasses(get_class($this), ENUM_PARENT_CLASSES_ALL, false) as $sClass) {
$aEventSources[] = $sClass;
}
EventService::FireEvent($sEvent, $aEventSources, $aEventData);
EventService::FireEvent(new EventData($sEvent, $aEventSources, $aEventData));
}
}