Метод fillManageCapability

Расположение

Исходный файл метода в Bitrix Framework

Путь к исходному файлу строки 1341–1383
~/bitrix/modulesim/lib/V2/Chat.php

Исходный код

PHP
public static

Сигнатура метода

public static function fillManageCapability(array $chats, ?int $userId = null): void

Возвращает: void

Описание

Batch-fill {@see self::getHasManageCapability()} for a list of chats: one event dispatch per entity type and viewer, so serialization of chat lists does not degrade into N+1. The viewer defaults to each chat's own context user, matching the lazy {@see self::getHasManageCapability()} path, so both resolve the capability for the same "current viewer". An explicit $userId overrides this for every chat.

Параметры

2
Имя Тип По умолчанию Флаги
$chats array -
-
$userId ?int null
-