mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°4756 - Ease extensibility for CRUD operations : Event Service - 💚 Fix CI
This commit is contained in:
@@ -274,10 +274,11 @@ function DisplayEvents(WebPage $oPage, $sClass)
|
|||||||
];
|
];
|
||||||
$aRows = [];
|
$aRows = [];
|
||||||
foreach ($aEvents as $sEvent => $aEventInfo) {
|
foreach ($aEvents as $sEvent => $aEventInfo) {
|
||||||
$aDesc = $aEventInfo['description'];
|
/** @var \Combodo\iTop\Service\Events\Description\EventDescription $oDesc */
|
||||||
|
$oDesc = $aEventInfo['description'];
|
||||||
$aRows[] = [
|
$aRows[] = [
|
||||||
'event' => $sEvent,
|
'event' => $sEvent,
|
||||||
'description' => $aDesc['description'] ?? '',
|
'description' => $oDesc->GetDescription(),
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
$oTable = DataTableUIBlockFactory::MakeForStaticData(Dict::S('UI:Schema:Events:Defined'), $aColumns, $aRows);
|
$oTable = DataTableUIBlockFactory::MakeForStaticData(Dict::S('UI:Schema:Events:Defined'), $aColumns, $aRows);
|
||||||
|
|||||||
@@ -309,8 +309,8 @@ class EventService
|
|||||||
$aRes = [];
|
$aRes = [];
|
||||||
$oClass = new ReflectionClass($sClass);
|
$oClass = new ReflectionClass($sClass);
|
||||||
foreach (self::$aEventDescription as $sEvent => $aEventInfo) {
|
foreach (self::$aEventDescription as $sEvent => $aEventInfo) {
|
||||||
if (is_array($aEventInfo['description']->GetSources())) {
|
if (is_array($aEventInfo['description']->GetEventSources())) {
|
||||||
foreach ($aEventInfo['description']->GetSources() as $sSource) {
|
foreach ($aEventInfo['description']->GetEventSources() as $sSource) {
|
||||||
if ($sClass == $sSource || $oClass->isSubclassOf($sSource)) {
|
if ($sClass == $sSource || $oClass->isSubclassOf($sSource)) {
|
||||||
$aRes[$sEvent] = $aEventInfo;
|
$aRes[$sEvent] = $aEventInfo;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user