Class AdminAccessRole

Class AdminAccessRole

A role represents a collection of administration permissions that can be assigned to an user. The role has also a set of descriptive attributes like a name and a description so the user can understand, what the roles purpose is.

AdminAccessRole implements AdminAccessRoleInterface

Methods summary

public __construct( AdminAccessRoleDeleterInterface $deleter, AdminAccessRoleWriterInterface $writer, AdminAccessPermissionReaderInterface $permissionReader )

AdminAccessRole constructor.

public checkDeletingPermission( AdminAccessGroupInterface $group ) : boolean

Checks deleting permission for a given group.

public checkReadingPermission( AdminAccessGroupInterface $group ) : boolean

Checks reading permission for a given group.

public checkWritingPermission( AdminAccessGroupInterface $group ) : boolean

Checks writing permission for a given group.

public checkDeletingPermissionForUnknownGroup( void ) : boolean

Checks deleting permission for an unknown group.

public checkReadingPermissionForUnknownGroup( void ) : boolean

Checks reading permission for an unknown group.

public checkWritingPermissionForUnknownGroup( void ) : boolean

Checks writing permission for an unknown group.

public delete( void ) : AdminAccessRoleInterface

Deletes an access role.

public getId( void ) : integer

Returns the role id.

public getName( void ) : KeyValueCollection

Returns the role names as a collection.

public getDescription( void ) : KeyValueCollection

Returns the role descriptions as a collection.

public getSortOrder( void ) : integer

Returns the role sort order.

public setId( IdType $id ) : AdminAccessRoleInterface

Sets the role ID.

public setName( KeyValueCollection $name ) : AdminAccessRoleInterface

Sets the role names.

public setDescription( KeyValueCollection $description ) : AdminAccessRoleInterface

Sets the role description.

public setSortOrder( IntType $sortOrder ) : AdminAccessRoleInterface

Sets the role sort order.

public setDeletingUnknownGroupGranted( BoolType $permissionGranted ) : AdminAccessRoleInterface

Sets the deleting permission value for an unknown group.

public setReadingUnknownGroupGranted( BoolType $permissionGranted ) : AdminAccessRoleInterface

Sets the reading permission value for an unknown group.

public setWritingUnknownGroupGranted( BoolType $permissionGranted ) : AdminAccessRoleInterface

Sets the writing permission value for an unknown group.

public store( void ) : AdminAccessRoleInterface

Stores this role into the database.

public update( void ) : AdminAccessRoleInterface

Updates this role in the database.

public getPermissionByGroup( AdminAccessGroupInterface $group ) : AdminAccessPermissionPresentationInterface|AdminAccessPermissionPersistenceInterface|null

Returns the a permission for this role by a given group.

public getPermissionsByGroupCollection( AdminAccessGroupCollection $groupCollection ) : AdminAccessPermissionCollection

Returns the a permission for this role by a given group collection.

public setProtected( BoolType $value ) : AdminAccessRoleInterface

Sets the protected value.

public getProtected( void ) : boolean

Returns the protected value.

Properties summary

protected $id : integer

		
protected $sortOrder : integer

		
protected $deletingUnknownGroupGranted : boolean

		
protected $readingUnknownGroupGranted : boolean

		
protected $writingUnknownGroupGranted : boolean

		
protected $protected : boolean