Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
guardTransition example
if
(
!
$marking
->
has
(
$place
)
)
{
return
new
TransitionBlockerList
(
[
TransitionBlocker::
createBlockedByMarking
(
$marking
)
,
]
)
;
}
}
if
(
null ===
$this
->dispatcher
)
{
return
new
TransitionBlockerList
(
)
;
}
$event
=
$this
->
guardTransition
(
$subject
,
$marking
,
$transition
)
;
if
(
$event
->
isBlocked
(
)
)
{
return
$event
->
getTransitionBlockerList
(
)
;
}
return
new
TransitionBlockerList
(
)
;
}
private
function
guardTransition
(
object
$subject
, Marking
$marking
, Transition
$transition
)
: ?GuardEvent
{
if
(
null ===
$this
->dispatcher
)
{