AdminAccessPermission

Implements \AdminAccessPermissionPresentationInterface, \AdminAccessPermissionPersistenceInterface, \AdminAccessPermissionInterface

Class AdminAccessPermission

A permission is the bridge element between a group and a role. It assigns these two elements a values for a reading, writing and deleting (permission).

category

System

package

AdminAccess

subpackage

Entities

Methods

AdminAccessPermission constructor.

__construct(\AdminAccessPermissionDeleterInterface $permissionDeleter, \AdminAccessPermissionWriterInterface $permissionWriter, \AdminAccessGroupReaderInterface $groupReader, \AdminAccessPermissionReaderInterface $permissionReader) 

Arguments

$permissionDeleter

\AdminAccessPermissionDeleterInterface

Permission deleter.

$permissionWriter

\AdminAccessPermissionWriterInterface

Permission writer.

$groupReader

\AdminAccessGroupReaderInterface

Group reader.

$permissionReader

\AdminAccessPermissionReaderInterface

Permission reader.

Deletes a permission.

delete() : \AdminAccessPermissionPresentationInterface|\AdminAccessPermissionPersistenceInterface

Response

\AdminAccessPermissionPresentationInterface|\AdminAccessPermissionPersistenceInterface

Returns same instance for chained method calls.

Returns the group of this permission.

getGroup() : \AdminAccessGroupInterface
Throws
\GroupNotFoundException

Response

\AdminAccessGroupInterface

Group object.

Returns the role of this permission.

getRole() : \AdminAccessRoleInterface

Response

\AdminAccessRoleInterface

Role object.

Grants deleting access.

grantDeleting() : \AdminAccessPermissionPresentationInterface|\AdminAccessPermissionPersistenceInterface

Response

\AdminAccessPermissionPresentationInterface|\AdminAccessPermissionPersistenceInterface

Returns same instance for chained method calls.

Grants reading access.

grantReading() : \AdminAccessPermissionPresentationInterface|\AdminAccessPermissionPersistenceInterface

Response

\AdminAccessPermissionPresentationInterface|\AdminAccessPermissionPersistenceInterface

Returns same instance for chained method calls.

Grants writing access.

grantWriting() : \AdminAccessPermissionPresentationInterface|\AdminAccessPermissionPersistenceInterface

Response

\AdminAccessPermissionPresentationInterface|\AdminAccessPermissionPersistenceInterface

Returns same instance for chained method calls.

Checks if deleting is granted.

isDeletingGranted() : boolean

Response

boolean

True if deleting is granted, false otherwise.

Checks if reading is granted.

isReadingGranted() : boolean

Response

boolean

True if reading is granted, false otherwise.

Checks if writing is granted.

isWritingGranted() : boolean

Response

boolean

True if writing is granted, false otherwise.

Removes deleting access.

removeDeleting() : \AdminAccessPermissionPresentationInterface|\AdminAccessPermissionPersistenceInterface

Response

\AdminAccessPermissionPresentationInterface|\AdminAccessPermissionPersistenceInterface

Returns same instance for chained method calls.

Removes reading access.

removeReading() : \AdminAccessPermissionPresentationInterface|\AdminAccessPermissionPersistenceInterface

Response

\AdminAccessPermissionPresentationInterface|\AdminAccessPermissionPersistenceInterface

Returns same instance for chained method calls.

Removes writing access.

removeWriting() : \AdminAccessPermissionPresentationInterface|\AdminAccessPermissionPersistenceInterface

Response

\AdminAccessPermissionPresentationInterface|\AdminAccessPermissionPersistenceInterface

Returns same instance for chained method calls.

Sets the group of this permission.

setGroup(\AdminAccessGroupInterface $accessGroup) : \AdminAccessPermissionPresentationInterface|\AdminAccessPermissionPersistenceInterface

Arguments

$accessGroup

\AdminAccessGroupInterface

Group object.

Response

\AdminAccessPermissionPresentationInterface|\AdminAccessPermissionPersistenceInterface

Returns same instance for chained method calls.

Sets group ID.

setGroupId(\IdType $groupId) : \AdminAccessPermissionPresentationInterface|\AdminAccessPermissionPersistenceInterface

Arguments

$groupId

\IdType

Group ID.

Response

\AdminAccessPermissionPresentationInterface|\AdminAccessPermissionPersistenceInterface

Returns same instance for chained method calls.

Sets the role of this permission.

setRole(\AdminAccessRoleInterface $accessRole) : \AdminAccessPermissionPresentationInterface|\AdminAccessPermissionPersistenceInterface

Arguments

$accessRole

\AdminAccessRoleInterface

Role object.

Response

\AdminAccessPermissionPresentationInterface|\AdminAccessPermissionPersistenceInterface

Returns same instance for chained method calls.

Stores a permission into the database.

store() : \AdminAccessPermissionPresentationInterface|\AdminAccessPermissionPersistenceInterface

Response

\AdminAccessPermissionPresentationInterface|\AdminAccessPermissionPersistenceInterface

Returns same instance for chained method calls.

Updates a permission in the database.

update() : \AdminAccessPermissionPresentationInterface|\AdminAccessPermissionPersistenceInterface

Response

\AdminAccessPermissionPresentationInterface|\AdminAccessPermissionPersistenceInterface

Returns same instance for chained method calls.

Properties

permissionDeleter

permissionDeleter : \AdminAccessPermissionDeleterInterface

permissionWriter

permissionWriter : \AdminAccessPermissionWriterInterface

groupReader

groupReader : \AdminAccessGroupReaderInterface

permissionReader

permissionReader : \AdminAccessPermissionInterface

role

role : \AdminAccessRoleInterface

group

group : \AdminAccessGroupInterface

groupId

groupId : integer
var

Type(s)

integer

readingGranted

readingGranted : boolean
var

Type(s)

boolean

writingGranted

writingGranted : boolean
var

Type(s)

boolean

deletingGranted

deletingGranted : boolean
var

Type(s)

boolean