Overview
  • Package
  • Class
  • Tree
  • Todo

Packages

  • AddonValue
    • Interfaces
  • AdminAccess
    • Collections
    • Deleters
    • Entities
    • Exceptions
    • Factories
    • Interfaces
    • Managers
    • Readers
    • Writers
  • AdminHttpViewControllers
  • ApiV2Controllers
  • Authentication
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Strategies
  • Category
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • Customer
    • Address
    • Country
    • CountryZone
    • Interfaces
    • Storages
    • Validation
    • ValueObjects
  • CustomerGroup
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Serializers
    • Services
    • ValueObjects
  • Email
    • Collections
    • Entities
    • Exceptions
    • Interfaces
    • Repository
    • ValueObjects
  • Extensions
    • Customers
    • Emails
    • Geschaeftskundenversand
    • Helpers
    • Invoices
    • Orders
    • ParcelShopFinder
    • QuickEdit
    • Serializers
    • Templates
  • Geschaeftskundenversand
    • Exceptions
  • Http
    • Collections
    • Exceptions
    • Factories
    • Interfaces
    • ValueObjects
  • HttpViewControllers
  • InfoBox
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
  • Invoice
    • Interfaces
    • ValueObjects
  • Loaders
    • CrossCuttingLoader
    • GXCoreLoader
    • Interfaces
  • Manufacturer
    • Entities
    • Factories
    • Interfaces
    • Repositories
  • Modules
    • Collections
    • Controllers
    • Interfaces
  • None
  • Order
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
    • ValueObjects
  • OrderStatus
    • Collections
    • Entities
    • Exceptions
    • Factories
    • Interfaces
    • Repositories
  • Precheck
  • Product
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • ProductModule
    • Collections
    • Deleter
    • Entities
    • Factories
    • Interface
    • Interfaces
    • Reader
    • Repositories
    • Writer
  • QuantityUnit
    • Entities
    • Factories
    • Repositories
  • QuickEdit
    • Interfaces
    • Repositories
  • Review
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Services
    • ValueObjects
  • Shared
    • ClassFinder
    • Exceptions
    • FileSystem
    • Interfaces
    • Storage
    • Types
  • SharedShoppingCart
    • Interfaces
  • Slider
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
  • Smarty
    • plugins
  • StaticSeoUrl
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
  • StaticSeoUrls
  • Statistics
    • Interfaces
  • UserConfiguration
    • Interfaces
    • Repository
  • VersionInfo
    • Factories
    • Reader
    • ValueObjects
  • VPE
    • Entities
    • Factories
    • Repositories
  • Withdrawal
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Services
    • ValueObjects

Classes

  • AdminAccessService
  • AdminAccessSettings

Class AdminAccessService

Class AdminAccessService

AdminAccessService implements AdminAccessServiceInterface
Package: AdminAccess
Category: System
Located at Services/System/AdminAccess/AdminAccessService.inc.php

Methods summary

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

AdminAccessService constructor.

AdminAccessService constructor.

Parameters

$settings
Settings.
$permissionManager
Permission Manager.
$roleManager
Role Manager.
$userManager
User Manager.
$groupManager
Group Manager.
public boolean
# checkDeletingPermissionForController( NonEmptyStringType $identifier, IdType $customerId )

Checks the deleting permission for a controller.

Checks the deleting permission for a controller.

Parameters

$identifier
The name of a controller to identify an admin access group.
$customerId
ID of a customer to check the permission for.

Returns

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

Implementation of

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

Checks the deleting permission for a page.

Checks the deleting permission for a page.

Parameters

$identifier
The name of a page to identify an admin access group.
$customerId
ID of a customer to check permission for.

Returns

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

Implementation of

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

Checks the deleting permission for an ajax handler.

Checks the deleting permission for an ajax handler.

Parameters

$identifier
The name of an ajax handler to identify an admin access group.
$customerId
ID of a customer to check permission for.

Returns

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

Implementation of

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

Checks the reading permission for a controller.

Checks the reading permission for a controller.

Parameters

$identifier
The name of a controller to identify an admin access group.
$customerId
ID of a customer to check the permission for.

Returns

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

Implementation of

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

Checks the reading permission for a page.

Checks the reading permission for a page.

Parameters

$identifier
The name of a page to identify an admin access group.
$customerId
ID of a customer to check permission for.

Returns

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

Implementation of

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

Checks the reading permission for an ajax handler.

Checks the reading permission for an ajax handler.

Parameters

$identifier
The name of an ajax handler to identify an admin access group.
$customerId
ID of a customer to check permission for.

Returns

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

Implementation of

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

Checks the writing permission for a controller.

Checks the writing permission for a controller.

Parameters

$identifier
The name of a controller to identify an admin access group.
$customerId
ID of a customer to check the permission for.

Returns

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

Implementation of

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

Checks the writing permission for a page.

Checks the writing permission for a page.

Parameters

$identifier
The name of a page to identify an admin access group.
$customerId
ID of a customer to check permission for.

Returns

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

Implementation of

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

Checks the writing permission for an ajax handler.

Checks the writing permission for an ajax handler.

Parameters

$identifier
The name of an ajax handler to identify an admin access group.
$customerId
ID of a customer to check permission for.

Returns

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

Implementation of

AdminAccessServiceInterface::checkWritingPermissionForAjaxHandler()
public AdminAccessPermissionCollection
# getPermissionsByRoleId( IdType $roleId )

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

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

Parameters

$roleId
Role ID.

Returns

AdminAccessPermissionCollection
Permission collection object with all role permissions.

Implementation of

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

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

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

Parameters

$roleId
Role ID.
$customerId
Customer ID.

Returns

AdminAccessServiceInterface
Returns same instance for chained method calls.

Implementation of

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

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

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

Parameters

$roleId
Role ID.
$customerId
Customer ID.

Returns

AdminAccessServiceInterface
Returns same instance for chained method calls.

Implementation of

AdminAccessServiceInterface::removeRoleFromUserByCustomerId()
public AdminAccessRoleCollection
# getRolesByCustomerId( IdType $id )

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

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

Parameters

$id
User ID.

Returns

AdminAccessRoleCollection
Collection of all roles that certain user has.

Implementation of

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

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

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

Parameters

$groupId
Group ID to grant permission for.
$roleId
Role ID to grant permission for.

Returns

AdminAccessServiceInterface
Returns same instance for chained method calls.

Throws

GroupNotFoundException

Implementation of

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

Removes deleting permission from role for a given group id.

Removes deleting permission from role for a given group id.

Parameters

$groupId
Group ID to remove permission for.
$roleId
Role ID to remove permission from.

Returns

AdminAccessServiceInterface
Returns same instance for chained method calls.

Throws

GroupNotFoundException

Implementation of

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

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

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

Parameters

$groupId
Group ID to grant permission for.
$roleId
Role ID to grant permission for.

Returns

AdminAccessServiceInterface
Returns same instance for chained method calls.

Throws

GroupNotFoundException

Implementation of

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

Removes reading permission from role for a given group id.

Removes reading permission from role for a given group id.

Parameters

$groupId
Group ID to remove permission for.
$roleId
Role ID to remove permission from.

Returns

AdminAccessServiceInterface
Returns same instance for chained method calls.

Throws

GroupNotFoundException

Implementation of

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

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

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

Parameters

$groupId
Group ID to grant permission for.
$roleId
Role ID to grant permission for.

Returns

AdminAccessServiceInterface
Returns same instance for chained method calls.

Throws

GroupNotFoundException

Implementation of

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

Removes writing permission from role for a given group id.

Removes writing permission from role for a given group id.

Parameters

$groupId
Group ID to remove permission for.
$roleId
Role ID to remove permission from.

Returns

AdminAccessServiceInterface
Returns same instance for chained method calls.

Throws

GroupNotFoundException

Implementation of

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

Creates a new role.

Creates a new role.

Parameters

$name

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

$description

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

$sortOrder
Roles sort order.
$unknownReadingGranted
Value of the reading permission for unknown groups.
$unknownWritingGranted
Value of the writing permission for unknown groups.
$unknownDeletingGranted
Value of the deleting permission for unknown groups.

Returns

AdminAccessRoleInterface
Returns the create role.

Implementation of

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

Updates a role by a given role ID.

Updates a role by a given role ID.

Parameters

$roleId
Role ID to remove permission from.
$newName

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

$newDescription

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

$newSortOrder
New roles sort order.
$unknownReadingGranted
Value of the reading permission for unknown groups.
$unknownWritingGranted
Value of the writing permission for unknown groups.
$unknownDeletingGranted
Value of the deleting permission for unknown groups.

Returns

AdminAccessServiceInterface
Returns same instance for chained method calls.

Implementation of

AdminAccessServiceInterface::updateRoleById()
public AdminAccessServiceInterface
# deleteRoleById( IdType $roleId )

Deletes role by a given role ID.

Deletes role by a given role ID.

Parameters

$roleId
ID of the role that should be deleted.

Returns

AdminAccessServiceInterface
Returns same instance for chained method calls.

Implementation of

AdminAccessServiceInterface::deleteRoleById()
public AdminAccessRoleCollection
# getAllRoles( )

Returns a collection of all roles.

Returns a collection of all roles.

Returns

AdminAccessRoleCollection
Role collection with all available roles.

Implementation of

AdminAccessServiceInterface::getAllRoles()
public AdminAccessServiceInterface
# deleteUserByCustomerId( IdType $customerId )

Deletes an admin access user by a given customer ID.

Deletes an admin access user by a given customer ID.

Parameters

$customerId
ID of the user that should be deleted.

Returns

AdminAccessServiceInterface
Returns same instance for chained method calls.

Implementation of

AdminAccessServiceInterface::deleteUserByCustomerId()
public AdminAccessRoleInterface
# getRoleById( IdType $roleId )

Returns a role by a given role ID.

Returns a role by a given role ID.

Parameters

$roleId
ID of the requested role.

Returns

AdminAccessRoleInterface

Implementation of

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

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

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

Parameters

$roleId
Role ID.
$groupCollection
Group collection.

Returns

AdminAccessPermissionCollection
Permission collection object with all role permissions.

Implementation of

AdminAccessServiceInterface::getPermissionsByGroupCollection()
public AdminAccessGroupCollection
# getAllGroups( )

Returns a collection of all groups.

Returns a collection of all groups.

Returns

AdminAccessGroupCollection
Group collection.

Implementation of

AdminAccessServiceInterface::getAllGroups()
public AdminAccessGroupInterface
# getGroupByController( NonEmptyStringType $identifier )

Returns a group by a given controller identifier.

Returns a group by a given controller identifier.

Parameters

$identifier
Controller identifier.

Returns

AdminAccessGroupInterface
Group object.

Throws

GroupNotFoundException

Implementation of

AdminAccessServiceInterface::getGroupByController()
public AdminAccessGroupInterface
# getGroupByPage( NonEmptyStringType $identifier )

Returns a group by a given page identifier.

Returns a group by a given page identifier.

Parameters

$identifier
Page identifier.

Returns

AdminAccessGroupInterface
Group object.

Throws

GroupNotFoundException

Implementation of

AdminAccessServiceInterface::getGroupByPage()
public AdminAccessGroupInterface
# getGroupByAjaxHandler( NonEmptyStringType $identifier )

Returns a group by a given ajax handler identifier.

Returns a group by a given ajax handler identifier.

Parameters

$identifier
Ajax handler identifier.

Returns

AdminAccessGroupInterface
Group object.

Throws

GroupNotFoundException

Implementation of

AdminAccessServiceInterface::getGroupByAjaxHandler()
public AdminAccessGroupInterface
# getGroupById( IdType $id )

Returns a group by a given group id.

Returns a group by a given group id.

Parameters

$id
Group id.

Returns

AdminAccessGroupInterface
Group object.

Throws

GroupNotFoundException

Implementation of

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

Adds a group item to an existing group.

Adds a group item to an existing group.

Parameters

$groupId
Id of the group.
$identifier
Identifier for this item.
$type
Type of this item.

Returns

AdminAccessGroupInterface
Group object.

Throws

GroupNotFoundException

Implementation of

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

Removes a group item from an existing group.

Removes a group item from an existing group.

Parameters

$groupId
Id of the group.
$identifier
Identifier for this item.
$type
Type of this item.

Returns

AdminAccessGroupInterface
Group object.

Throws

GroupNotFoundException
GroupItemNotFoundInCollectionException

Implementation of

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

Creates a new group.

Creates a new group.

Parameters

$name

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

$description

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

$parentId
Id of the parent group.
$sortOrder
Group sorts order.

Returns

AdminAccessGroupInterface
Returns the create role.

Throws

GroupNotFoundException

Implementation of

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

Updates a group by a given group ID.

Updates a group by a given group ID.

Parameters

$id

$newName Collection with the group names. Index of a group name must be his language code.

$newName

$newDescription Collection with the group descriptions. Index of a group name must be his language code.

$newDescription
$newParentId New id of the parent group.
$newParentId
$newSortOrder New group sorts order.
$newSortOrder

Returns

AdminAccessServiceInterface
Returns same instance for chained method calls.

Throws

GroupNotFoundException

Implementation of

AdminAccessServiceInterface::updateGroup()
public AdminAccessServiceInterface
# deleteGroupById( IdType $id )

Deletes a group by a given group ID.

Deletes a group by a given group ID.

Parameters

$id
ID of the group that should be deleted.

Returns

AdminAccessServiceInterface
Returns same instance for chained method calls.

Throws

GroupNotFoundException

Implementation of

AdminAccessServiceInterface::deleteGroupById()

Properties summary

protected AdminAccessSettingsInterface $settings
#
protected AdminAccessPermissionManagerInterface $permissionManager
#
protected AdminAccessRoleManagerInterface $roleManager
#
protected AdminAccessUserManagerInterface $userManager
#
protected AdminAccessGroupManagerInterface $groupManager
#
API documentation generated by ApiGen