- Модуль: tasks
- Путь к файлу: ~/bitrix/modules/tasks/classes/general/task.php
- Класс: CTasks
- Вызов: CTasks::EmitPullWithTag
static function EmitPullWithTag($arRecipients, $tag, $cmd, $arParams)
{
if (!is_array($arRecipients))
{
throw new TasksException('EA_PARAMS', TasksException::TE_WRONG_ARGUMENTS);
}
$arRecipients = array_unique($arRecipients);
if (!CModule::IncludeModule('pull'))
{
return;
}
$bWasFatalError = false;
foreach ($arRecipients as $userId)
{
$userId = (int)$userId;
if ($userId < 1)
{
$bWasFatalError = true;
continue; // skip invalid items
}
CPullWatch::Add($userId, $tag);
//BitrixPullEvent::add($userId, $arEventData);
CPullWatch::AddToStack(
$tag,
[
'module_id' => 'tasks',
'command' => $cmd,
'params' => $arParams,
]
);
}
if ($bWasFatalError)
{
throw new TasksException('EA_PARAMS', TasksException::TE_WRONG_ARGUMENTS);
}
}