AwardApprovalResolverService
in package
uses
LocatorAwareTrait
Resolves branch-scoped approvers for award approval process steps.
Table of Contents
Methods
- previewProcess() : array<int, array<string, mixed>>
- Preview every configured step for an award.
- resolveApprovers() : array<string|int, Member>
- Resolve approver members for one step and award context.
- resolveBranch() : EntityInterface|null
- Resolve the branch context for branch-scoped approver lookups.
- findAncestorBranchByType() : EntityInterface
- Walk parent branches until a branch of the requested type is found.
- resolveMemberApprover() : array<string|int, Member>
- Resolve an explicit member approver.
- resolveOfficeApprovers() : array<string|int, Member>
- Resolve current office holders in the approval branch.
- resolvePermissionApprovers() : array<string|int, Member>
- Resolve active members whose branch-scoped roles grant a permission.
- resolveRoleApprovers() : array<string|int, Member>
- Resolve active members with a role in the approval branch.
Methods
previewProcess()
Preview every configured step for an award.
public
previewProcess(ApprovalProcess $process, Award $award) : array<int, array<string, mixed>>
Parameters
- $process : ApprovalProcess
-
Approval process
- $award : Award
-
Award context
Return values
array<int, array<string, mixed>>resolveApprovers()
Resolve approver members for one step and award context.
public
resolveApprovers(ApprovalProcessStep $step, Award $award) : array<string|int, Member>
Parameters
- $step : ApprovalProcessStep
-
Approval step
- $award : Award
-
Award context
Return values
array<string|int, Member>resolveBranch()
Resolve the branch context for branch-scoped approver lookups.
public
resolveBranch(ApprovalProcessStep $step, Award $award) : EntityInterface|null
Parameters
- $step : ApprovalProcessStep
-
Approval step
- $award : Award
-
Award context
Return values
EntityInterface|nullfindAncestorBranchByType()
Walk parent branches until a branch of the requested type is found.
protected
findAncestorBranchByType(EntityInterface $branch, string $branchType) : EntityInterface
Parameters
- $branch : EntityInterface
-
Starting branch
- $branchType : string
-
Branch type
Return values
EntityInterfaceresolveMemberApprover()
Resolve an explicit member approver.
protected
resolveMemberApprover(ApprovalProcessStep $step) : array<string|int, Member>
Parameters
- $step : ApprovalProcessStep
-
Approval step
Return values
array<string|int, Member>resolveOfficeApprovers()
Resolve current office holders in the approval branch.
protected
resolveOfficeApprovers(ApprovalProcessStep $step, Award $award) : array<string|int, Member>
Parameters
- $step : ApprovalProcessStep
-
Approval step
- $award : Award
-
Award context
Return values
array<string|int, Member>resolvePermissionApprovers()
Resolve active members whose branch-scoped roles grant a permission.
protected
resolvePermissionApprovers(ApprovalProcessStep $step, Award $award) : array<string|int, Member>
Parameters
- $step : ApprovalProcessStep
-
Approval step
- $award : Award
-
Award context
Return values
array<string|int, Member>resolveRoleApprovers()
Resolve active members with a role in the approval branch.
protected
resolveRoleApprovers(ApprovalProcessStep $step, Award $award) : array<string|int, Member>
Parameters
- $step : ApprovalProcessStep
-
Approval step
- $award : Award
-
Award context