KMP PHP API Reference

WorkflowConditionRegistry
in package

Workflow Condition Registry

Static registry for condition evaluators used in workflow branching decisions. Plugins register conditions (e.g., 'Officers.OfficeRequiresWarrant') that workflow nodes use for conditional logic. Follows the ViewCellRegistry pattern.

Table of Contents

Constants

REQUIRED_FIELDS  : mixed = ['condition', 'label', 'description', 'inputSch...
Required fields for each condition registration.

Properties

$conditions  : array<string|int, mixed>
$initialized  : bool

Methods

clear()  : void
Clear all registered conditions.
getAllConditions()  : array<string|int, mixed>
Get all registered conditions.
getCondition()  : array<string|int, mixed>|null
Get a single condition by condition name.
getConditionsBySource()  : array<string|int, mixed>
Get conditions for a specific source.
getDebugInfo()  : array<string|int, mixed>
Get debug information about registered conditions.
getForDesigner()  : array<string|int, mixed>
Get a simplified view for the visual designer UI.
getRegisteredSources()  : array<string|int, mixed>
Get all registered source identifiers.
isRegistered()  : bool
Check if a source is registered.
register()  : void
Register conditions from a source plugin.
unregister()  : void
Remove conditions from a specific source.
ensureInitialized()  : void
Ensure the registry is initialized.
validateRequiredFields()  : void
Validate that required fields are present in a registration entry.

Constants

REQUIRED_FIELDS

Required fields for each condition registration.

private mixed REQUIRED_FIELDS = ['condition', 'label', 'description', 'inputSchema', 'evaluatorClass', 'evaluatorMethod']

Properties

Methods

getAllConditions()

Get all registered conditions.

public static getAllConditions() : array<string|int, mixed>
Return values
array<string|int, mixed>

All conditions keyed by source

getCondition()

Get a single condition by condition name.

public static getCondition(string $conditionName) : array<string|int, mixed>|null
Parameters
$conditionName : string

Condition identifier

Return values
array<string|int, mixed>|null

Condition configuration or null if not found

getConditionsBySource()

Get conditions for a specific source.

public static getConditionsBySource(string $source) : array<string|int, mixed>
Parameters
$source : string

Source identifier

Return values
array<string|int, mixed>

Conditions from the specified source

getDebugInfo()

Get debug information about registered conditions.

public static getDebugInfo() : array<string|int, mixed>
Return values
array<string|int, mixed>

Debug information

getForDesigner()

Get a simplified view for the visual designer UI.

public static getForDesigner() : array<string|int, mixed>
Return values
array<string|int, mixed>

Designer-safe condition data (no class names)

getRegisteredSources()

Get all registered source identifiers.

public static getRegisteredSources() : array<string|int, mixed>
Return values
array<string|int, mixed>

List of registered source identifiers

isRegistered()

Check if a source is registered.

public static isRegistered(string $source) : bool
Parameters
$source : string

Source identifier

Return values
bool

True if registered

register()

Register conditions from a source plugin.

public static register(string $source, array<string|int, mixed> $conditions) : void
Parameters
$source : string

Source identifier (e.g., 'Officers', 'Awards')

$conditions : array<string|int, mixed>

Array of condition configurations

Tags
throws
InvalidArgumentException

If required fields are missing

unregister()

Remove conditions from a specific source.

public static unregister(string $source) : void
Parameters
$source : string

Source identifier to remove

validateRequiredFields()

Validate that required fields are present in a registration entry.

private static validateRequiredFields(array<string|int, mixed> $entry, array<string|int, mixed> $requiredFields, string $source) : void
Parameters
$entry : array<string|int, mixed>

Registration entry to validate

$requiredFields : array<string|int, mixed>

Required field names

$source : string

Source identifier for error messages

Tags
throws
InvalidArgumentException

If required fields are missing

On this page

Search results