PermissionHandler
class PermissionHandler
Class PermissionHandler
Properties
protected PermissionRepository | $repo | Repository instance |
Methods
Permission|null
get(string $name, string $siteKey = 'default')
Get a permission from repository
Permission|null
getOrNew(string $name, string $siteKey = 'default')
Get a permission from repository or generate when not exists
Permission|null
find(string $name, string $siteKey = 'default')
Get a permission from repository
void
Permission|null
findOrNew(string $name, string $siteKey = 'default')
Get a permission from repository or generate when not exists
newItem()
Returns new permission instance
void
destroy(string $name, string $siteKey = 'default')
Remove from repository
void
loadBranch(string $name, string $siteKey = 'default')
특정 대상이 포함된 하위 권한 정보를 가져와 캐싱 함
void
Details
at line 44
__construct(PermissionRepository $repo)
PermissionHandler constructor.
at line 56
Permission|null
get(string $name, string $siteKey = 'default')
Get a permission from repository
at line 72
Permission|null
getOrNew(string $name, string $siteKey = 'default')
Get a permission from repository or generate when not exists
at line 94
Permission|null
find(string $name, string $siteKey = 'default')
Get a permission from repository
at line 105
protected void
setAncestor(Permission $permission)
Set permission's ancestor to permission
at line 130
Permission|null
findOrNew(string $name, string $siteKey = 'default')
Get a permission from repository or generate when not exists
at line 140
Permission
newItem()
Returns new permission instance
at line 153
Permission
register(string $name, Grant $grant, string $siteKey = 'default')
Register permission information
at line 180
void
destroy(string $name, string $siteKey = 'default')
Remove from repository
at line 196
void
loadBranch(string $name, string $siteKey = 'default')
특정 대상이 포함된 하위 권한 정보를 가져와 캐싱 함
at line 210
void
move(Permission $permission, string|null $to = null)
Move entity hierarchy to new parent or root