Class AdminAccessService

Class AdminAccessService

AdminAccessService implements AdminAccessServiceInterface

Methods summary

public __construct( AdminAccessSettingsInterface $settings, AdminAccessPermissionManagerInterface $permissionManager, AdminAccessRoleManagerInterface $roleManager, AdminAccessUserManagerInterface $userManager, AdminAccessGroupManagerInterface $groupManager )

AdminAccessService constructor.

public checkDeletingPermissionForController( NonEmptyStringType $identifier, IdType $customerId ) : boolean

Checks the deleting permission for a controller.

public checkDeletingPermissionForPage( NonEmptyStringType $identifier, IdType $customerId ) : boolean

Checks the deleting permission for a page.

public checkDeletingPermissionForAjaxHandler( NonEmptyStringType $identifier, IdType $customerId ) : boolean

Checks the deleting permission for an ajax handler.

public checkReadingPermissionForController( NonEmptyStringType $identifier, IdType $customerId ) : boolean

Checks the reading permission for a controller.

public checkReadingPermissionForPage( NonEmptyStringType $identifier, IdType $customerId ) : boolean

Checks the reading permission for a page.

public checkReadingPermissionForAjaxHandler( NonEmptyStringType $identifier, IdType $customerId ) : boolean

Checks the reading permission for an ajax handler.

public checkWritingPermissionForController( NonEmptyStringType $identifier, IdType $customerId ) : boolean

Checks the writing permission for a controller.

public checkWritingPermissionForPage( NonEmptyStringType $identifier, IdType $customerId ) : boolean

Checks the writing permission for a page.

public checkWritingPermissionForAjaxHandler( NonEmptyStringType $identifier, IdType $customerId ) : boolean

Checks the writing permission for an ajax handler.

public getPermissionsByRoleId( IdType $roleId ) : AdminAccessPermissionCollection

Returns a collection of all permissions by a given role ID.

public addRoleToUserByCustomerId( IdType $roleId, IdType $customerId ) : AdminAccessServiceInterface

Adds a role to a user by a given role and customer ID.

public removeRoleFromUserByCustomerId( IdType $roleId, IdType $customerId ) : AdminAccessServiceInterface

Removes a role from a user by given role and customer ID.

public getRolesByCustomerId( IdType $id ) : AdminAccessRoleCollection

Returns all roles of certain user by a given user ID.

public grantDeletingPermissionToRole( IdType $groupId, IdType $roleId ) : AdminAccessServiceInterface

Grants deleting permission to a role for a given group id.

public removeDeletingPermissionFromRole( IdType $groupId, IdType $roleId ) : AdminAccessServiceInterface

Removes deleting permission from role for a given group id.

public grantReadingPermissionToRole( IdType $groupId, IdType $roleId ) : AdminAccessServiceInterface

Grants reading permission to a role for a given group id.

public removeReadingPermissionFromRole( IdType $groupId, IdType $roleId ) : AdminAccessServiceInterface

Removes reading permission from role for a given group id.

public grantWritingPermissionToRole( IdType $groupId, IdType $roleId ) : AdminAccessServiceInterface

Grants writing permission to a role for a given group id.

public removeWritingPermissionFromRole( IdType $groupId, IdType $roleId ) : AdminAccessServiceInterface

Removes writing permission from role for a given group id.

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

Creates a new role.

public updateRoleById( IdType $roleId, KeyValueCollection $newName, KeyValueCollection $newDescription, IntType $newSortOrder, BoolType $unknownReadingGranted, BoolType $unknownWritingGranted, BoolType $unknownDeletingGranted ) : AdminAccessServiceInterface

Updates a role by a given role ID.

public deleteRoleById( IdType $roleId ) : AdminAccessServiceInterface

Deletes role by a given role ID.

public getAllRoles( void ) : AdminAccessRoleCollection

Returns a collection of all roles.

public deleteUserByCustomerId( IdType $customerId ) : AdminAccessServiceInterface

Deletes an admin access user by a given customer ID.

public getRoleById( IdType $roleId ) : AdminAccessRoleInterface

Returns a role by a given role ID.

public getPermissionsByGroupCollection( IdType $roleId, AdminAccessGroupCollection $groupCollection ) : AdminAccessPermissionCollection

Returns a collection of permissions of a role by a given group collection.

public getAllGroups( void ) : AdminAccessGroupCollection

Returns a collection of all groups.

public getGroupByController( NonEmptyStringType $identifier ) : AdminAccessGroupInterface

Returns a group by a given controller identifier.

public getGroupByPage( NonEmptyStringType $identifier ) : AdminAccessGroupInterface

Returns a group by a given page identifier.

public getGroupByAjaxHandler( NonEmptyStringType $identifier ) : AdminAccessGroupInterface

Returns a group by a given ajax handler identifier.

public getGroupById( IdType $id ) : AdminAccessGroupInterface

Returns a group by a given group id.

public addItemToGroup( IdType $groupId, NonEmptyStringType $identifier, NonEmptyStringType $type ) : AdminAccessGroupInterface

Adds a group item to an existing group.

public removeItemFromGroup( IdType $groupId, NonEmptyStringType $identifier, NonEmptyStringType $type ) : AdminAccessGroupInterface

Removes a group item from an existing group.

public createNewGroup( KeyValueCollection $name, KeyValueCollection $description, IdType $parentId, IntType $sortOrder ) : AdminAccessGroupInterface

Creates a new group.

public updateGroup( IdType $id, KeyValueCollection $newName, KeyValueCollection $newDescription, IdType $newParentId, IntType $newSortOrder ) : AdminAccessServiceInterface

Updates a group by a given group ID.

public deleteGroupById( IdType $id ) : AdminAccessServiceInterface

Deletes a group by a given group ID.

Properties summary