class TransitionBlocker

A reason why a transition cannot be performed for a subject.

Constants

BLOCKED_BY_MARKING

BLOCKED_BY_EXPRESSION_GUARD_LISTENER

UNKNOWN

Methods

__construct(string $message, string $code, array $parameters = [])

No description

createBlockedByMarking(Marking $marking)

Create a blocker that says the transition cannot be made because it is not enabled.

createBlockedByExpressionGuardListener(string $expression)

Creates a blocker that says the transition cannot be made because it has been blocked by the expression guard listener.

createUnknown()

Creates a blocker that says the transition cannot be made because of an unknown reason.

string
getMessage()

No description

string
getCode()

No description

array
getParameters()

No description

Details

at line 33
__construct(string $message, string $code, array $parameters = [])

Parameters

string $message
string $code
array $parameters

at line 48
static TransitionBlocker createBlockedByMarking(Marking $marking)

Create a blocker that says the transition cannot be made because it is not enabled.

It means the subject is in wrong place (i.e. status): * If the workflow is a state machine: the subject is not in the previous place of the transition. * If the workflow is a workflow: the subject is not in all previous places of the transition.

Parameters

Marking $marking

Return Value

TransitionBlocker

at line 59
static TransitionBlocker createBlockedByExpressionGuardListener(string $expression)

Creates a blocker that says the transition cannot be made because it has been blocked by the expression guard listener.

Parameters

string $expression

Return Value

TransitionBlocker

at line 72
static TransitionBlocker createUnknown()

Creates a blocker that says the transition cannot be made because of an unknown reason.

This blocker code is chiefly for preserving backwards compatibility.

Return Value

TransitionBlocker

at line 77
string getMessage()

Return Value

string

at line 82
string getCode()

Return Value

string

at line 87
array getParameters()

Return Value

array