AccessController extends BaseAccessController
Table of Contents
Constants
Methods
- __construct() : mixed
- batchCheck() : array<string|int, mixed>
- can() : bool
- check() : bool
- Checking access rights by action
- checkAll() : bool
- checkAny() : bool
- checkByItem() : bool
- checkByItemId() : bool
- getEntityFilter() : array<string|int, mixed>|null
- Get filter for entity.
- getInstance() : static
- getUser() : AccessibleUser
Constants
RULE_AND
public
mixed
RULE_AND
= 'AND'
RULE_OR
public
mixed
RULE_OR
= 'OR'
Methods
__construct()
public
__construct(mixed $userId[, UserModelRepository|null $userModelRepository = null ]) : mixed
Parameters
- $userId : mixed
- $userModelRepository : UserModelRepository|null = null
batchCheck()
public
batchCheck(array<string|int, mixed> $request, AccessibleItem $item) : array<string|int, mixed>
Parameters
- $request : array<string|int, mixed>
-
[ actionId => params ]
- $item : AccessibleItem
Tags
Return values
array<string|int, mixed> —[ actionId => true|false ]
can()
public
static can(mixed $userId, string $action[, mixed $itemId = null ][, mixed $params = null ]) : bool
Parameters
- $userId : mixed
- $action : string
- $itemId : mixed = null
- $params : mixed = null
Return values
boolcheck()
Checking access rights by action
public
check(string $action[, AccessibleItem|null $item = null ][, null $params = null ]) : bool
Parameters
- $action : string
- $item : AccessibleItem|null = null
- $params : null = null
Tags
Return values
boolcheckAll()
public
checkAll(array<int, SignPermissionDictionary::*> $actions[, AccessibleItem|null $item = null ][, mixed $params = null ]) : bool
Parameters
- $actions : array<int, SignPermissionDictionary::*>
- $item : AccessibleItem|null = null
- $params : mixed = null
Return values
boolcheckAny()
public
checkAny(array<int, SignPermissionDictionary::*> $actions[, AccessibleItem|null $item = null ][, mixed $params = null ]) : bool
Parameters
- $actions : array<int, SignPermissionDictionary::*>
- $item : AccessibleItem|null = null
- $params : mixed = null
Return values
boolcheckByItem()
public
checkByItem(string $action, Item $item[, array<string|int, mixed> $params = null ]) : bool
Parameters
- $action : string
- $item : Item
- $params : array<string|int, mixed> = null
Return values
boolcheckByItemId()
public
checkByItemId(string $action[, int $itemId = null ][, mixed $params = null ]) : bool
Parameters
- $action : string
- $itemId : int = null
- $params : mixed = null
Return values
boolgetEntityFilter()
Get filter for entity.
public
getEntityFilter(string $action, string $entityName[, mixed $params = null ]) : array<string|int, mixed>|null
Parameters
- $action : string
- $entityName : string
-
recommended to use the name of the tablet class.
- $params : mixed = null
Tags
Return values
array<string|int, mixed>|null —is filter not available - return null.
getInstance()
public
static getInstance(mixed $userId) : static
Parameters
- $userId : mixed
Return values
staticgetUser()
public
getUser() : AccessibleUser