class TransitionBlocker
A reason why a transition cannot be performed for a subject.
BLOCKED_BY_MARKING | |
BLOCKED_BY_EXPRESSION_GUARD_LISTENER | |
UNKNOWN |
__construct(string $message, string $code, array $parameters = array()) | ||
static TransitionBlocker | createBlockedByMarking(Marking $marking) Create a blocker that says the transition cannot be made because it is not enabled. | |
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. | |
static TransitionBlocker | createUnknown() Creates a blocker that says the transition cannot be made because of an unknown reason. | |
string | getMessage() | |
string | getCode() | |
array | getParameters() |
string | $message | |
string | $code | |
array | $parameters |
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.
Marking | $marking |
TransitionBlocker |
Creates a blocker that says the transition cannot be made because it has been blocked by the expression guard listener.
string | $expression |
TransitionBlocker |
Creates a blocker that says the transition cannot be made because of an unknown reason.
This blocker code is chiefly for preserving backwards compatibility.
TransitionBlocker |
string |
string |
array |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Workflow/TransitionBlocker.html