phpDocumentor

AdminAccessPermissionManager
in package
implements AdminAccessPermissionManagerInterface

Class AdminAccessPermissionManager

Tags
category

System

subpackage

Managers

Interfaces, Classes and Traits

AdminAccessPermissionManagerInterface
Interface AdminAccessPermissionManagerInterface

Table of Contents

$groupReader  : AdminAccessGroupReaderInterface
$roleFactory  : AdminAccessRoleFactoryInterface
$roleReader  : AdminAccessRoleReaderInterface
$userReader  : AdminAccessUserReaderInterface
__construct()  : mixed
AdminAccessPermissionManager constructor.
checkDeletingPermissionForAjaxHandler()  : bool
Checks the deleting permission for an ajax handler.
checkDeletingPermissionForController()  : bool
Checks the deleting permission for a controller.
checkDeletingPermissionForPage()  : bool
Checks the deleting permission for a page.
checkReadingPermissionForAjaxHandler()  : bool
Checks the reading permission for an ajax handler.
checkReadingPermissionForController()  : bool
Checks the reading permission for a controller.
checkReadingPermissionForPage()  : bool
Checks the reading permission for a page.
checkWritingPermissionForAjaxHandler()  : bool
Checks the writing permission for an ajax handler.
checkWritingPermissionForController()  : bool
Checks the writing permission for a controller.
checkWritingPermissionForPage()  : bool
Checks the writing permission for a page.
getPermissionsByGroupCollection()  : AdminAccessPermissionCollection
Returns a collection of permissions of a role by a given group collection.
getPermissionsByRoleId()  : AdminAccessPermissionCollection
Returns a collection of all permissions by a given role ID.
grantDeletingPermission()  : AdminAccessPermissionManager
Grants deleting permission to a role for a given group id.
grantReadingPermission()  : AdminAccessPermissionManager
Grants reading permission to a role for a given group id.
grantWritingPermission()  : AdminAccessPermissionManager
Grants writing permission to a role for a given group id.
removeDeletingPermission()  : AdminAccessPermissionManagerInterface
Removes deleting permission from role for a given group id.
removeReadingPermission()  : AdminAccessPermissionManagerInterface
Removes reading permission from role for a given group id.
removeWritingPermission()  : AdminAccessPermissionManagerInterface
Removes writing permission from role for a given group id.
_getGroupByAjaxHandler()  : AdminAccessGroupInterface
Returns a group by a given identifier.
_getGroupByController()  : AdminAccessGroupInterface
Returns a group by a given identifier.
_getGroupByPage()  : AdminAccessGroupInterface
Returns a group by a given identifier.
_getPermission()  : AdminAccessPermissionPersistenceInterface|AdminAccessPermissionPresentationInterface
Returns a permission by a given role ID and group ID.
_getUser()  : AdminAccessUserInterface
Returns an user by a given customer ID.

Properties

Methods

__construct()

AdminAccessPermissionManager constructor.

public __construct(AdminAccessGroupReaderInterface $groupReader, AdminAccessRoleFactoryInterface $roleFactory, AdminAccessUserReaderInterface $userReader, AdminAccessRoleReaderInterface $roleReader) : mixed
Parameters
$groupReader : AdminAccessGroupReaderInterface

Group reader instance.

$roleFactory : AdminAccessRoleFactoryInterface

Role factory instance.

$userReader : AdminAccessUserReaderInterface

User reader instance.

$roleReader : AdminAccessRoleReaderInterface

Role reader instance.

Return values
mixed

checkDeletingPermissionForAjaxHandler()

Checks the deleting permission for an ajax handler.

public checkDeletingPermissionForAjaxHandler(NonEmptyStringType $identifier, IdType $customerId) : bool
Parameters
$identifier : NonEmptyStringType

The name of an ajax handler to identify an admin access group.

$customerId : IdType

ID of a customer to check permission for.

Return values
bool

True if customer has a deleting permission for the ajax handler, false otherwise.

checkDeletingPermissionForController()

Checks the deleting permission for a controller.

public checkDeletingPermissionForController(NonEmptyStringType $identifier, IdType $customerId) : bool
Parameters
$identifier : NonEmptyStringType

The name of a controller to identify an admin access group.

$customerId : IdType

ID of a customer to check the permission for.

Return values
bool

True if customer has a deleting permission for the controller, false otherwise.

checkDeletingPermissionForPage()

Checks the deleting permission for a page.

public checkDeletingPermissionForPage(NonEmptyStringType $identifier, IdType $customerId) : bool
Parameters
$identifier : NonEmptyStringType

The name of a page to identify an admin access group.

$customerId : IdType

ID of a customer to check permission for.

Return values
bool

True if customer has a deleting permission for the page, false otherwise.

checkReadingPermissionForAjaxHandler()

Checks the reading permission for an ajax handler.

public checkReadingPermissionForAjaxHandler(NonEmptyStringType $identifier, IdType $customerId) : bool
Parameters
$identifier : NonEmptyStringType

The name of an ajax handler to identify an admin access group.

$customerId : IdType

ID of a customer to check permission for.

Return values
bool

True if customer has a reading permission for the ajax handler, false otherwise.

checkReadingPermissionForController()

Checks the reading permission for a controller.

public checkReadingPermissionForController(NonEmptyStringType $identifier, IdType $customerId) : bool
Parameters
$identifier : NonEmptyStringType

The name of a controller to identify an admin access group.

$customerId : IdType

ID of a customer to check the permission for.

Return values
bool

True if customer has a reading permission for the controller, false otherwise.

checkReadingPermissionForPage()

Checks the reading permission for a page.

public checkReadingPermissionForPage(NonEmptyStringType $identifier, IdType $customerId) : bool
Parameters
$identifier : NonEmptyStringType

The name of a page to identify an admin access group.

$customerId : IdType

ID of a customer to check permission for.

Return values
bool

True if customer has a reading permission for the page, false otherwise.

checkWritingPermissionForAjaxHandler()

Checks the writing permission for an ajax handler.

public checkWritingPermissionForAjaxHandler(NonEmptyStringType $identifier, IdType $customerId) : bool
Parameters
$identifier : NonEmptyStringType

The name of an ajax handler to identify an admin access group.

$customerId : IdType

ID of a customer to check permission for.

Return values
bool

True if customer has a writing permission for the ajax handler, false otherwise.

checkWritingPermissionForController()

Checks the writing permission for a controller.

public checkWritingPermissionForController(NonEmptyStringType $identifier, IdType $customerId) : bool
Parameters
$identifier : NonEmptyStringType

The name of a controller to identify an admin access group.

$customerId : IdType

ID of a customer to check the permission for.

Return values
bool

True if customer has a writing permission for the controller, false otherwise.

checkWritingPermissionForPage()

Checks the writing permission for a page.

public checkWritingPermissionForPage(NonEmptyStringType $identifier, IdType $customerId) : bool
Parameters
$identifier : NonEmptyStringType

The name of a page to identify an admin access group.

$customerId : IdType

ID of a customer to check permission for.

Return values
bool

True if customer has a writing permission for the page, false otherwise.

_getPermission()

Returns a permission by a given role ID and group ID.

protected _getPermission(IdType $roleId, IdType $groupId) : AdminAccessPermissionPersistenceInterface|AdminAccessPermissionPresentationInterface

If no permission could be found, a new permission will be returned.

Parameters
$roleId : IdType

Role ID.

$groupId : IdType

Group ID.

Tags
throws
GroupNotFoundException
Return values
AdminAccessPermissionPersistenceInterface|AdminAccessPermissionPresentationInterface

Permission object.

Search results