PermissionAssociationable
Tools to work with a permission type field.
Table of Contents
- $permission : mixed
- $permissionState : mixed
- __construct() : mixed
- PermissionAssociationable constructor.
- checkState() : bool
- Checks if this permission is set to a given state.
- getId() : string
- Returns the permission id.
- getLibrary() : string
- Returns the permission library.
- getPermission() : Permission
- Returns the Permission entity.
- getState() : int
- Returns the current state of the permission.
- setState() : mixed
- Sets the current state of the permission.
Properties
$permission
protected
mixed
$permission
Tags
$permissionState
protected
mixed
$permissionState
Tags
Methods
__construct()
PermissionAssociationable constructor.
public
__construct(Actor $owner, Permission $permission, int $state) : mixed
Parameters
- $owner : Actor
- $permission : Permission
- $state : int
Return values
mixed —checkState()
Checks if this permission is set to a given state.
public
checkState(int $state) : bool
Parameters
- $state : int
Return values
bool —getId()
Returns the permission id.
public
getId() : string
Tags
Return values
string —getLibrary()
Returns the permission library.
public
getLibrary() : string
Tags
Return values
string —getPermission()
Returns the Permission entity.
public
getPermission() : Permission
Return values
Permission —getState()
Returns the current state of the permission.
public
getState() : int
Return values
int —setState()
Sets the current state of the permission.
public
setState(int $state) : mixed
Parameters
- $state : int