PHP 트레잇 Artesaos\Defender\Traits\Permissions\InteractsWithPermissions

파일 보기 프로젝트 열기: artesaos/defender

공개 메소드들

메소드 설명
attachPermission ( array | Artesaos\Defender\Permission $permission, array $options = [] ) Attach the given permission.
detachPermission ( Artesaos\Defender\Permission $permission ) : integer Detach the given permission from the model.
existPermission ( string $permissionName ) : boolean Get the a permission using the permission name.
extendPermission ( string $permission, array $options ) : boolean | null Extend an existing temporary permission.
revokeExpiredPermissions ( ) : integer | null Revoke expired user permissions.
revokePermission ( Artesaos\Defender\Permission $permission ) : integer Alias to the detachPermission method.
revokePermissions ( ) : integer Revoke all user permissions.
syncPermissions ( array $permissions ) : array Sync the given permissions.

메소드 상세

attachPermission() 공개 메소드

Attach the given permission.
public attachPermission ( array | Artesaos\Defender\Permission $permission, array $options = [] )
$permission array | Artesaos\Defender\Permission
$options array

detachPermission() 공개 메소드

Detach the given permission from the model.
public detachPermission ( Artesaos\Defender\Permission $permission ) : integer
$permission Artesaos\Defender\Permission
리턴 integer

existPermission() 공개 메소드

Get the a permission using the permission name.
public existPermission ( string $permissionName ) : boolean
$permissionName string
리턴 boolean

extendPermission() 공개 메소드

Extend an existing temporary permission.
public extendPermission ( string $permission, array $options ) : boolean | null
$permission string
$options array
리턴 boolean | null

revokeExpiredPermissions() 공개 메소드

Revoke expired user permissions.

revokePermission() 공개 메소드

Alias to the detachPermission method.
public revokePermission ( Artesaos\Defender\Permission $permission ) : integer
$permission Artesaos\Defender\Permission
리턴 integer

revokePermissions() 공개 메소드

Revoke all user permissions.
public revokePermissions ( ) : integer
리턴 integer

syncPermissions() 공개 메소드

Sync the given permissions.
public syncPermissions ( array $permissions ) : array
$permissions array
리턴 array