Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
Интерфейс AccessFilter
+ Граф наследования:AccessFilter:

Открытые члены

 __construct (AccessibleController $controller)
 
 getFilter (string $entity, array $params=[])
 

Подробное описание

Filter for getting items according to user rights.

См. определение в файле accessfilter.php строка 10

Конструктор(ы)

◆ __construct()

__construct ( AccessibleController $controller)
Аргументы
AccessibleController$controller

Замещается в AbstractAccessFilter.

Методы

◆ getFilter()

getFilter ( string $entity,
array $params = [] )

Filter for getting elements.

One instance of access filter can handle multiple entities (recommended to use 1 filter for entities that are similar in meaning and purpose). To get a filter for a specific entity, you need to pass the entity parameter.

If the user has full access, then you can return an empty array (i.e. there is no filtering). If the user does not have access at all, then you can return a deliberately false filter that will not return records (for example, ‘ID IS NULL’).

Аргументы
string$entity
array$params
Возвращает
array
Исключения
UnknownEntityExceptionif they are trying to get a filter for an unknown entity.

Замещается в StoreDocumentFilter, StoreViewFilter и AbstractAccessFilter.