WorkflowApproverResolverRegistry
in package
Workflow Approver Resolver Registry
Static registry for dynamic approver resolvers. Plugins register resolvers so the designer can show them in a dropdown and the engine can look up serviceClass/method by registry key.
Table of Contents
Properties
- $resolvers : array<string|int, mixed>
Methods
- clear() : void
- Clear all registered resolvers.
- getAllResolvers() : array<string|int, mixed>
- Get all registered resolvers.
- getForDesigner() : array<string|int, mixed>
- Returns frontend-safe data — strips serviceClass, keeps method and configSchema.
- getResolver() : array<string|int, mixed>|null
- Get a single resolver by key.
- register() : void
- Register approver resolvers from a plugin/source.
Properties
$resolvers
private
static array<string|int, mixed>
$resolvers
= []
Methods
clear()
Clear all registered resolvers.
public
static clear() : void
getAllResolvers()
Get all registered resolvers.
public
static getAllResolvers() : array<string|int, mixed>
Return values
array<string|int, mixed> —All resolvers keyed by resolver key
getForDesigner()
Returns frontend-safe data — strips serviceClass, keeps method and configSchema.
public
static getForDesigner() : array<string|int, mixed>
Return values
array<string|int, mixed> —Designer-safe resolver data
getResolver()
Get a single resolver by key.
public
static getResolver(string $key) : array<string|int, mixed>|null
Parameters
- $key : string
-
Resolver identifier
Return values
array<string|int, mixed>|null —Resolver configuration or null if not found
register()
Register approver resolvers from a plugin/source.
public
static register(string $source, array<string|int, mixed> $items) : void
Each resolver item should have:
- resolver: unique key (e.g., 'Activities.AuthorizationApproverResolver')
- label: human-readable name
- description: what this resolver does
- serviceClass: fully qualified PHP class name
- serviceMethod: method to call (receives WorkflowApproval, returns int[])
- configSchema: array of config fields the resolver needs Each field: ['type' => 'string|integer', 'label' => '...', 'required' => bool, 'description' => '...']
Parameters
- $source : string
-
Source identifier (e.g., 'Activities')
- $items : array<string|int, mixed>
-
Array of resolver configurations