AbstractAccessController extends BaseAccessController implements AccessErrorInterface uses AccessUserTrait, AccessErrorTrait
AbstractYes
Table of Contents
Interfaces
Methods
- __construct() : mixed
- addError() : void
- addErrors() : void
- batchCheck() : array<string|int, mixed>
- can() : bool
- check() : bool
- checkByItemId() : bool
- forward() : bool
- getDictionary() : AccessDictionaryInterface
- getEntityFilter() : array<string|int, mixed>|null
- Get filter for entity.
- getErrorCollection() : ErrorCollection
- getErrors() : array<string|int, Error>
- getInstance() : static
- getModel() : AccessModelInterface
- getUser() : AccessibleUser
Methods
__construct()
public
__construct(int $userId) : mixed
Parameters
- $userId : int
addError()
public
addError(string $class[, string $message = '' ]) : void
Parameters
- $class : string
- $message : string = ''
addErrors()
public
addErrors(Error ...$errors) : void
Parameters
- $errors : Error
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()
public
check(string $action[, AccessibleItem $item = null ][, mixed $params = null ]) : bool
Parameters
- $action : string
- $item : AccessibleItem = null
- $params : 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
boolforward()
public
forward(AccessibleController|string $controller, string $action, AccessibleItem $item[, mixed $parameters = null ]) : bool
Parameters
- $controller : AccessibleController|string
- $action : string
- $item : AccessibleItem
- $parameters : mixed = null
Return values
boolgetDictionary()
public
abstract getDictionary() : AccessDictionaryInterface
Return values
AccessDictionaryInterfacegetEntityFilter()
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.
getErrorCollection()
public
getErrorCollection() : ErrorCollection
Return values
ErrorCollectiongetErrors()
public
getErrors() : array<string|int, Error>
Return values
array<string|int, Error>getInstance()
public
static getInstance(mixed $userId) : static
Parameters
- $userId : mixed
Return values
staticgetModel()
public
abstract getModel(array<string|int, mixed>|Arrayable $data) : AccessModelInterface
Parameters
- $data : array<string|int, mixed>|Arrayable
Return values
AccessModelInterfacegetUser()
public
getUser() : AccessibleUser