AdminAccessPermissionReader

Implements \AdminAccessPermissionReaderInterface

Class AdminAccessPermissionReader

category

System

package

AdminAccess

subpackage

Readers

Methods

AdminAccessPermissionReader constructor.

__construct(\CI_DB_query_builder $queryBuilder, \AdminAccessPermissionFactoryInterface $permissionFactory) 

Arguments

$queryBuilder

\CI_DB_query_builder

Query builder.

$permissionFactory

\AdminAccessPermissionFactoryInterface

Permission factory.

Returns an AdminAccessPermission objects, that gets its property values from permission data array.

_createPermissionObject(array|null $permissionData, \AdminAccessRoleInterface $role, \AdminAccessGroupInterface $group) : \AdminAccessPermissionPersistenceInterface|\AdminAccessPermissionPresentationInterface

Arguments

$permissionData

array|null

Permission data.

$role

\AdminAccessRoleInterface

Role needed to create permission object.

$group

\AdminAccessGroupInterface

Group needed to create permission object.

Response

\AdminAccessPermissionPersistenceInterface|\AdminAccessPermissionPresentationInterface

Permission object.

Returns an AdminAccessPermission object by given AdminAccessRole and AdminAccessGroup objects.

get(\AdminAccessRoleInterface $accessRole, \AdminAccessGroupInterface $accessGroup) : \AdminAccessPermissionPresentationInterface|\AdminAccessPermissionPersistenceInterface|null

Arguments

$accessRole

\AdminAccessRoleInterface

Role object.

$accessGroup

\AdminAccessGroupInterface

Group object.

Response

\AdminAccessPermissionPresentationInterface|\AdminAccessPermissionPersistenceInterface|null

Permission object or null if permission not found.

Returns an AdminAccessPermissionCollection by a given AdminAccessRole and AdminAccessGroupCollection object.

getByGroupCollection(\AdminAccessRoleInterface $accessRole, \AdminAccessGroupCollection $groupCollection) : \AdminAccessPermissionCollection

Arguments

$accessRole

\AdminAccessRoleInterface

User role to find permission for.

$groupCollection

\AdminAccessGroupCollection

Collection of all groups in system.

Response

\AdminAccessPermissionCollection

Permission collection.

Properties

queryBuilder

queryBuilder : \CI_DB_query_builder
var

Type(s)

\CI_DB_query_builder

permissionFactory

permissionFactory : \AdminAccessPermissionFactoryInterface

permissionTable

permissionTable : string
var

Type(s)

string