Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
FlowSequenceCollection example
$flow
=
[
'id' => Uuid::
randomHex
(
)
,
'name' =>
$this
->
generateFlowName
(
$event
->
getName
(
)
,
$eventNames
[
$event
->
getName
(
)
]
)
,
'eventName' =>
$event
->
getName
(
)
,
'priority' =>
$i
+ 1,
'active' => true,
]
;
$sequenceTreeCount
=
random_int
(
1,
$maxSequenceTree
)
;
$sequences
=
new
FlowSequenceCollection
(
)
;
for
(
$t
= 0;
$t
<
$sequenceTreeCount
; ++
$t
)
{
$position
= 1;
$displayGroup
=
$t
+ 1;
$sequenceCount
=
random_int
(
1,
$maxSequencePerTree
)
;
$sequence
=
new
FlowSequenceEntity
(
)
;
$sequence
->
setId
(
Uuid::
randomHex
(
)
)
;
$sequence
->
setDisplayGroup
(
$displayGroup
)
;