mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
N°4756 Fix TypeError on EventData::$aCallbackData
This commit is contained in:
@@ -1394,7 +1394,10 @@ EOF
|
||||
}
|
||||
|
||||
$sListenerRank = (float)($oListener->GetChildText('rank', '0'));
|
||||
$sEvents .= "\n Combodo\iTop\Service\Events\EventService::RegisterListener(\"$sEventName\", $sEventListener, \$this->m_sObjectUniqId, \"$sListenerId\", null, $sListenerRank, '$sModuleRelativeDir');";
|
||||
$sEvents .= <<<PHP
|
||||
|
||||
Combodo\iTop\Service\Events\EventService::RegisterListener("$sEventName", $sEventListener, \$this->m_sObjectUniqId, [], null, $sListenerRank, '$sModuleRelativeDir');
|
||||
PHP;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,6 +20,7 @@ class EventData
|
||||
private string $sEvent;
|
||||
private $mEventSource;
|
||||
private array $aEventData;
|
||||
/** @var array Additional data collected by the listener : they can be set in {@see \Combodo\iTop\Service\Events\EventService::RegisterListener} */
|
||||
private array $aCallbackData;
|
||||
|
||||
/**
|
||||
@@ -101,13 +102,10 @@ class EventData
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the data associated with the listener.
|
||||
* The data were passed when registering the listener.
|
||||
*
|
||||
* @api
|
||||
* @return mixed The data registered with the listener.
|
||||
* @uses static::$aCallbackData
|
||||
*/
|
||||
public function GetCallbackData()
|
||||
public function GetCallbackData(): array
|
||||
{
|
||||
return $this->aCallbackData;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user