Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
isWorkflowTransitionType example
public
function
dump
(
Definition
$definition
, Marking
$marking
= null, array
$options
=
[
]
)
: string
{
$options
=
array_replace_recursive
(
self::DEFAULT_OPTIONS,
$options
)
;
$workflowMetadata
=
$definition
->
getMetadataStore
(
)
;
$code
=
$this
->
initialize
(
$options
,
$definition
)
;
foreach
(
$definition
->
getPlaces
(
)
as
$place
)
{
$code
[
]
=
$this
->
getState
(
$place
,
$definition
,
$marking
)
;
}
if
(
$this
->
isWorkflowTransitionType
(
)
)
{
foreach
(
$definition
->
getTransitions
(
)
as
$transition
)
{
$transitionEscaped
=
$this
->
escape
(
$transition
->
getName
(
)
)
;
$code
[
]
= "agent
$transitionEscaped
";
}
}
foreach
(
$definition
->
getTransitions
(
)
as
$transition
)
{
$transitionEscaped
=
$this
->
escape
(
$transition
->
getName
(
)
)
;
foreach
(
$transition
->
getFroms
(
)
as
$from
)
{
$fromEscaped
=
$this
->
escape
(
$from
)
;
foreach
(
$transition
->
getTos
(
)
as
$to
)
{
$toEscaped
=
$this
->
escape
(
$to
)
;