AdminAccessRoleManager

Implements \AdminAccessRoleManagerInterface

Class AdminAccessRoleManager

category

System

package

AdminAccess

subpackage

Managers

Methods

AdminAccessRoleManager constructor.

__construct(\AdminAccessRoleFactoryInterface $roleFactory, \AdminAccessRoleReaderInterface $roleReader) 

Arguments

$roleFactory

\AdminAccessRoleFactoryInterface

Role factory.

$roleReader

\AdminAccessRoleReaderInterface

Role reader.

Creates a new role.

createNewRole(\KeyValueCollection $name, \KeyValueCollection $description, \IntType $sortOrder, \BoolType $unknownReadingGranted, \BoolType $unknownWritingGranted, \BoolType $unknownDeletingGranted) : \AdminAccessRoleInterface

Arguments

$name

\KeyValueCollection

Collection with the role names. Index of a role name must be his language code.

$description

\KeyValueCollection

Collection with the role descriptions. Index of a role name must be his language code.

$sortOrder

\IntType

Roles sort order.

$unknownReadingGranted

\BoolType

Value of the reading permission for unknown groups.

$unknownWritingGranted

\BoolType

Value of the writing permission for unknown groups.

$unknownDeletingGranted

\BoolType

Value of the deleting permission for unknown groups.

Response

\AdminAccessRoleInterface

Returns the create role.

Deletes role by a given role ID.

deleteRole(\IdType $id) : \AdminAccessRoleManager

Arguments

$id

\IdType

ID of the role that should be deleted.

Response

\AdminAccessRoleManager

Returns same instance for chained method calls.

Returns a collection of all roles.

getAllRoles() : \AdminAccessRoleCollection

Response

\AdminAccessRoleCollection

Role collection with all available roles.

Returns a role by a given role ID.

getRoleById(\IdType $id) : \AdminAccessRoleInterface

Arguments

$id

\IdType

ID of the requested role.

Response

\AdminAccessRoleInterface

Updates a role by a given role ID.

updateRole(\IdType $id, \KeyValueCollection $newName, \KeyValueCollection $newDescription, \IntType $newSortOrder, \BoolType $unknownReadingGranted, \BoolType $unknownWritingGranted, \BoolType $unknownDeletingGranted) : \AdminAccessRoleManager

Arguments

$id

\IdType

Role ID to remove permission from.

$newName

\KeyValueCollection

Collection with the new role names. Index of a role name must be his language code.

$newDescription

\KeyValueCollection

Collection with the new role descriptions. Index of a role name must be his language code.

$newSortOrder

\IntType

New roles sort order.

$unknownReadingGranted

\BoolType

Value of the reading permission for unknown groups.

$unknownWritingGranted

\BoolType

Value of the writing permission for unknown groups.

$unknownDeletingGranted

\BoolType

Value of the deleting permission for unknown groups.

Response

\AdminAccessRoleManager

Returns same instance for chained method calls.

Properties

roleFactory

roleFactory : \AdminAccessRoleFactoryInterface

roleReader

roleReader : \AdminAccessRoleReaderInterface