Метод runBatch
Расположение
Исходный файл метода в Bitrix Framework
Путь к исходному файлу
строки
23–49
~/bitrix/modulestasks/lib/control/group/setcrmitems.php
Исходный код
Сигнатура метода
public function runBatch(int $userId, array $taskIds, array $crmItemIds): array
Возвращает:
array
Описание
Adds a single CRM element to every task in the chunk (ADD, not overwrite), reusing the validated AddItemsCommand path (CrmItemService::add -> UpdateTaskService::update). Access is checked by the caller; only concrete elements ({ABBR}_{id}) reach here. Tasks that already have every requested element bound are skipped, so the mass action does not fire redundant no-op updates (events, counters, reindex) via CrmItemService::add.
Параметры
3| Имя | Тип | По умолчанию | Флаги |
|---|---|---|---|
$userId
|
int
|
-
|
-
|
$taskIds
|
array
|
-
|
-
|
$crmItemIds
|
array
|
-
|
-
|