* refactor

* Add event AFTER_DISPLAY_PAGE
This commit is contained in:
Eric Espie
2021-12-31 11:06:03 +01:00
parent fba78e7d9b
commit 374b71c017
21 changed files with 144 additions and 94 deletions

View File

@@ -26,7 +26,7 @@
*/
use Combodo\iTop\Service\EventName;
use Combodo\iTop\Service\Event;
use Combodo\iTop\Service\EventService;
/**
@@ -220,7 +220,7 @@ class ormDocument
'object' => $oObj,
'document' => $oDocument,
);
Event::FireEvent(EventName::DOWNLOAD_DOCUMENT, $sClass, $aEventData);
EventService::FireEvent(EventName::DOWNLOAD_DOCUMENT, $sClass, $aEventData);
$oPage->TrashUnexpectedOutput();
$oPage->SetContentType($oDocument->GetMimeType());
$oPage->SetContentDisposition($sContentDisposition,$oDocument->GetFileName());