Menu

## PermissionAssociationable

PermissionAssociationable.php : 12

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

PermissionAssociationable.php : 18
`protected mixed $permission`

##### Tags

Id

  @ManyToOne(targetEntity="LotGD\Core\Models\Permission", inversedBy="permission")

JoinColumn

  (name="permission", referencedColumnName="id")

#### $permissionState

PermissionAssociationable.php : 20
`protected mixed $permissionState`

##### Tags

Column

  (type="integer")

### Methods

#### __construct()

PermissionAssociationable.php : 28

PermissionAssociationable constructor.

`public __construct(Actor $owner, Permission $permission, int $state) : mixed`

##### Parameters

$owner : Actor
$permission : Permission
$state : int

##### Return values

mixed —

#### checkState()

PermissionAssociationable.php : 58

Checks if this permission is set to a given state.

`public checkState(int $state) : bool`

##### Parameters

$state : int

##### Return values

bool —

#### getId()

PermissionAssociationable.php : 68

Returns the permission id.

`public getId() : string`

##### Tags

see

  Permission->getId()

##### Return values

string —

#### getLibrary()

PermissionAssociationable.php : 78

Returns the permission library.

`public getLibrary() : string`

##### Tags

see

  Permission->getLibrary()

##### Return values

string —

#### getPermission()

PermissionAssociationable.php : 87

Returns the Permission entity.

`public getPermission() : Permission`

##### Return values

Permission —

#### getState()

PermissionAssociationable.php : 39

Returns the current state of the permission.

`public getState() : int`

##### Return values

int —

#### setState()

PermissionAssociationable.php : 48

Sets the current state of the permission.

`public setState(int $state) : mixed`

##### Parameters

$state : int

##### Return values

mixed —

## Search results