• Модуль: rest
  • Путь к файлу: ~/bitrix/modules/rest/lib/event/eventbind.php
  • Класс: BitrixRestEventEventBind
  • Вызов: EventBind::processItemEvent
static function processItemEvent(array $arParams, array $arHandler): array
{
	$id = null;
	$event = $arParams[0] ?? null;

	if (!$event)
	{
		throw new RestException('event object not found trying to process event');
	}

	if ($event instanceof Event)
	{
		$item = $event->getParameter('id');
		$id = is_array($item) ? $item['ID']: $item;
	}

	if (!$id)
	{
		throw new RestException('id not found trying to process event');
	}

	return [
		'FIELDS' => [
			'ID' => $id
		],
	];
}