CCrmRequisiteRestProxy::processEvent

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmRequisiteRestProxy
  4. processEvent
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/restservice.php
  • Класс: \CCrmRequisiteRestProxy
  • Вызов: CCrmRequisiteRestProxy::processEvent
static function processEvent(array $arParams, array $arHandler)
{
	/* @var Main\Event $event */
	$event = $arParams[0];

	$eventName = $arHandler['EVENT_NAME'];
	switch(mb_strtolower($eventName))
	{
		case 'oncrmrequisiteadd':
		case 'oncrmrequisiteupdate':
			$arParams = array(array("ID" => $event->getParameter('id')));
			break;
		case 'oncrmrequisitedelete':
			$arParams = array($event->getParameter('id'));
			break;
		case 'oncrmrequisiteuserfieldadd':
		case 'oncrmrequisiteuserfieldupdate':
		case 'oncrmrequisiteuserfielddelete':
		case 'oncrmrequisiteuserfieldsetenumvalues':
			$arParams = array($event);
			break;
		default:
			throw new RestException("The Event \"{$eventName}\" is not supported in current context");
	}

	return parent::processEntityEvent(CCrmOwnerType::Requisite, $arParams, $arHandler);
}

Добавить комментарий