diff --git a/pages/schema.php b/pages/schema.php index 64cde9916..3f93aecf0 100644 --- a/pages/schema.php +++ b/pages/schema.php @@ -274,10 +274,11 @@ function DisplayEvents(WebPage $oPage, $sClass) ]; $aRows = []; foreach ($aEvents as $sEvent => $aEventInfo) { - $aDesc = $aEventInfo['description']; + /** @var \Combodo\iTop\Service\Events\Description\EventDescription $oDesc */ + $oDesc = $aEventInfo['description']; $aRows[] = [ 'event' => $sEvent, - 'description' => $aDesc['description'] ?? '', + 'description' => $oDesc->GetDescription(), ]; } $oTable = DataTableUIBlockFactory::MakeForStaticData(Dict::S('UI:Schema:Events:Defined'), $aColumns, $aRows); diff --git a/sources/Application/Service/Events/EventService.php b/sources/Application/Service/Events/EventService.php index 6abcc2fcd..d780b8925 100644 --- a/sources/Application/Service/Events/EventService.php +++ b/sources/Application/Service/Events/EventService.php @@ -309,8 +309,8 @@ class EventService $aRes = []; $oClass = new ReflectionClass($sClass); foreach (self::$aEventDescription as $sEvent => $aEventInfo) { - if (is_array($aEventInfo['description']->GetSources())) { - foreach ($aEventInfo['description']->GetSources() as $sSource) { + if (is_array($aEventInfo['description']->GetEventSources())) { + foreach ($aEventInfo['description']->GetEventSources() as $sSource) { if ($sClass == $sSource || $oClass->isSubclassOf($sSource)) { $aRes[$sEvent] = $aEventInfo; }