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 = array())

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

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

Parameters

string $message
string $code
array $parameters

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

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

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

string getMessage()

Return Value

string

string getCode()

Return Value

string

array getParameters()

Return Value

array