Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/Core/Notification/Action/_ActionWebhook.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,10 @@ abstract class _ActionWebhook extends ActionNotification
* Default WebResponse handler for a WebRequest made by an _ActionWebhook
*
* @param \Combodo\iTop\Core\WebResponse $oResponse
* @param array $aParams Parameters of the handler, must contain at least the triggering object and activated webhook action information:
* [
* 'oTriggeringObject' => ['class' => <CLASS>, 'id' => <ID>],
* 'oActionWebhook' => ['class' => <CLASS>, 'id' => <ID>],
* ]
* @param array{
* oActionWebhook: array{class: string, id: int},
* oTriggeringObject: \DBObject|array{class: string, id: int},
* } $aParams Parameters of the handler, must contain at least the triggering object and activated webhook action information
*
* @throws \ArchivedObjectException
* @throws \CoreException
Expand All @@ -42,6 +41,7 @@ public static function ExecuteResponseHandler(WebResponse $oResponse, array $aPa
]);
throw new Exception('Missing parameters in response handler. See error log for details.');
}
/** @var \DBObject $oTriggeringObject */
$oTriggeringObject = is_object($aParams['oTriggeringObject']) ?
$aParams['oTriggeringObject'] :
MetaModel::GetObject($aParams['oTriggeringObject']['class'], $aParams['oTriggeringObject']['id'], true, true);
Expand Down