Метод readable

public

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

public function readable(int $userId, array $activities, AccessMode $mode): array

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

Описание

The activities of the set as this mode ({@see AccessMode}) lets the user see them, in the order they came in: the ones that may be read as they are, the rest either gone or replaced by a stub. The rights over the whole set are read before the first check and in one batch ({@see self::preload()}), so the checks that follow reach the database for nothing. Handing a set over without preloading it is what turns this into a query per activity. An activity that carries no id is nothing to check the rights of - there is no row to derive them from - and nothing to show a placeholder of either, so it is out of the result under both modes.

Параметры

3
Имя Тип По умолчанию Флаги
$userId int —
—
$activities array —
—
$mode AccessMode —
—

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

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

Путь к исходному файлу Source
~/bitrix/modulescrm/lib/V2/Internal/Access/Activity/ActivityAccess.php
Расположение метода в файле
Строки 215–242

Исходный код

PHP