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

@@ -25,6 +25,7 @@
* @license http://opensource.org/licenses/AGPL-3.0
*/
use Combodo\iTop\Service\EventData;
use Combodo\iTop\Service\EventName;
use Combodo\iTop\Service\EventService;
@@ -220,7 +221,7 @@ class ormDocument
'object' => $oObj,
'document' => $oDocument,
);
EventService::FireEvent(EventName::DOWNLOAD_DOCUMENT, $sClass, $aEventData);
EventService::FireEvent(new EventData(EventName::DOWNLOAD_DOCUMENT, $sClass, $aEventData));
$oPage->TrashUnexpectedOutput();
$oPage->SetContentType($oDocument->GetMimeType());
$oPage->SetContentDisposition($sContentDisposition,$oDocument->GetFileName());