PaymentDocumentsRepository::subscribeToPullEvents

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. PaymentDocumentsRepository
  4. subscribeToPullEvents
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/entity/paymentdocumentsrepository.php
  • Класс: Bitrix\Crm\Entity\PaymentDocumentsRepository
  • Вызов: PaymentDocumentsRepository::subscribeToPullEvents
private function subscribeToPullEvents()
{
	$userId = (int)\CCrmSecurityHelper::GetCurrentUserID();

	if ($userId <= 0 || !Main\Loader::includeModule('pull'))
	{
		return;
	}

	\CPullWatch::Add($userId, 'CRM_ENTITY_ORDER');

	if (count($this->orderIds) > 0 && Main\Loader::includeModule('salescenter'))
	{
		foreach ($this->orderIds as $orderId)
		{
			\CPullWatch::Add($userId, "SALESCENTER_ORDER_PAYMENT_VIEWED_$orderId");
		}
	}
}

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