Arikaim CMS

EntityPermissionsRelation

Entity permissions relation

Table of Contents

Methods

getPermission()  : Model|null
Get permission model
getPublicPermission()  : Model|false
Get public entity permission
hasAccess()  : bool
Return true if user have access
hasPermissions()  : bool
Return true if model have permissions
isPublic()  : bool
Return true if item is public
permissions()  : hasMany
Entity permisisons relation

Methods

getPermission()

Get permission model

public getPermission(int $userId[, string $type = 'user' ]) : Model|null
Parameters
$userId : int
$type : string = 'user'
Return values
Model|null

getPublicPermission()

Get public entity permission

public getPublicPermission([int|null $entityId = null ]) : Model|false
Parameters
$entityId : int|null = null
Return values
Model|false

hasAccess()

Return true if user have access

public hasAccess(int $userId, string|array<string|int, mixed> $access[, string|null $type = 'user' ][, int|null $typeId = null ]) : bool
Parameters
$userId : int
$access : string|array<string|int, mixed>
$type : string|null = 'user'
$typeId : int|null = null
Return values
bool

isPublic()

Return true if item is public

public isPublic([int|null $entityId = null ]) : bool
Parameters
$entityId : int|null = null
Return values
bool

        
On this page

Search results