• Модуль: tasks
  • Путь к файлу: ~/bitrix/modules/tasks/classes/general/task.php
  • Класс: CTasks
  • Вызов: CTasks::EmitPullWithTagPrefix
static function EmitPullWithTagPrefix($arRecipients, $tagPrefix, $cmd, $arParams)
{
	if (!is_array($arRecipients))
	{
		throw new TasksException('EA_PARAMS', TasksException::TE_WRONG_ARGUMENTS);
	}

	$arRecipients = array_unique($arRecipients);

	if (!CModule::IncludeModule('pull'))
	{
		return;
	}

	/*
	$arEventData = array(
		'module_id' => 'tasks',
		'command'   => 'notify',
		'params'    => CIMNotify::GetFormatNotify(
			array(
				'ID' => -3
			)
		),
	);
	*/

	$bWasFatalError = false;

	foreach ($arRecipients as $userId)
	{
		$userId = (int)$userId;

		if ($userId < 1)
		{
			$bWasFatalError = true;
			continue;    // skip invalid items
		}

		//BitrixPullEvent::add($userId, $arEventData);
		CPullWatch::AddToStack(
			$tagPrefix . $userId,
			[
				'module_id' => 'tasks',
				'command' => $cmd,
				'params' => $arParams,
			]
		);
	}

	if ($bWasFatalError)
	{
		throw new TasksException('EA_PARAMS', TasksException::TE_WRONG_ARGUMENTS);
	}
}