mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-12 23:14:18 +01:00
Move event declaration where the object is defined
This commit is contained in:
@@ -488,26 +488,6 @@
|
||||
</event_datum>
|
||||
</event_data>
|
||||
</event>
|
||||
<event id="EVENT_DOWNLOAD_DOCUMENT" _delta="define">
|
||||
<description>A document has been downloaded from the GUI</description>
|
||||
<sources>
|
||||
<source id="Document">Document</source>
|
||||
</sources>
|
||||
<event_data>
|
||||
<event_datum id="object">
|
||||
<description>The object containing the document</description>
|
||||
<type>DBObject</type>
|
||||
</event_datum>
|
||||
<event_datum id="document">
|
||||
<description>The document downloaded</description>
|
||||
<type>ormDocument</type>
|
||||
</event_datum>
|
||||
<event_datum id="debug_info">
|
||||
<description>Debug string</description>
|
||||
<type>string</type>
|
||||
</event_datum>
|
||||
</event_data>
|
||||
</event>
|
||||
<event id="EVENT_LOGIN" _delta="define">
|
||||
<description>Inform the listeners about the connection states</description>
|
||||
<event_data>
|
||||
|
||||
@@ -1853,6 +1853,28 @@
|
||||
</presentation>
|
||||
</class>
|
||||
</classes>
|
||||
<events>
|
||||
<event id="EVENT_DOWNLOAD_DOCUMENT" _delta="define">
|
||||
<description>A document has been downloaded from the GUI</description>
|
||||
<sources>
|
||||
<source id="Document">Document</source>
|
||||
</sources>
|
||||
<event_data>
|
||||
<event_datum id="object">
|
||||
<description>The object containing the document</description>
|
||||
<type>DBObject</type>
|
||||
</event_datum>
|
||||
<event_datum id="document">
|
||||
<description>The document downloaded</description>
|
||||
<type>ormDocument</type>
|
||||
</event_datum>
|
||||
<event_datum id="debug_info">
|
||||
<description>Debug string</description>
|
||||
<type>string</type>
|
||||
</event_datum>
|
||||
</event_data>
|
||||
</event>
|
||||
</events>
|
||||
<menus>
|
||||
<menu id="DataAdministration" xsi:type="MenuGroup" _delta="define">
|
||||
<rank>70</rank>
|
||||
|
||||
@@ -340,7 +340,7 @@ final class EventService
|
||||
foreach (self::$aEventDescriptions as $sEvent => $aEventInfo) {
|
||||
if (is_array($aEventInfo['description']->GetEventSources())) {
|
||||
foreach ($aEventInfo['description']->GetEventSources() as $sSource) {
|
||||
if ($sClass == $sSource || $oClass->isSubclassOf($sSource)) {
|
||||
if (\MetaModel::IsValidClass($sSource) && ($sClass == $sSource || $oClass->isSubclassOf($sSource))) {
|
||||
$aRes[$sEvent] = $aEventInfo;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user