Метод unlinkFromDescendantsBatch
Расположение
Исходный файл метода в Bitrix Framework
~/bitrix/modulesim/lib/V2/Chat/Tree/ChatTreeDepartmentSynchronizer.php
Исходный код
Сигнатура метода
public function unlinkFromDescendantsBatch(int $chatId, int $nodeId, int $cursor): DescendantUnlinkBatch
Возвращает:
DescendantUnlinkBatch
Описание
Down-cascade complement of syncToAncestors: when a department node is unlinked from a chat, the tree invariant requires it gone from every descendant too. Processes ONE bounded batch of direct children (keyset-paginated by ID > $cursor) — the caller (queue receiver) re-runs with the returned lastId until the level is drained. Each unlink raises OnRelationDeleted(CHAT) on the child, which drops its members AND enqueues that child's own down-cascade, so deeper levels are walked via the queue, not here.
Параметры
3| Имя | Тип | По умолчанию | Флаги |
|---|---|---|---|
$chatId
|
int
|
-
|
-
|
$nodeId
|
int
|
-
|
-
|
$cursor
|
int
|
-
|
-
|