Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
generateActionConfig example
$actions
=
$this
->
getActions
(
)
;
$sequence
= FlowSequenceEntity::
createFrom
(
$parent
)
;
/** @var FlowActionDefinition $action */
$action
=
$this
->faker->
randomElement
(
$actions
)
;
$sequence
->
setId
(
Uuid::
randomHex
(
)
)
;
$sequence
->
setParentId
(
$parent
->
getId
(
)
)
;
$sequence
->
setActionName
(
$action
->
getName
(
)
)
;
$sequence
->
setConfig
(
$this
->
generateActionConfig
(
$action
->
getName
(
)
)
)
;
$sequence
->
setTrueCase
(
$trueCase
)
;
$sequence
->
setPosition
(
$parent
->
getPosition
(
)
+ 1
)
;
if
(
$parent
->
getActionName
(
)
)
{
$sequence
->
assign
(
[
'parentId' =>
$parent
->
getParentId
(
)
,
'trueCase' =>
$parent
->
isTrueCase
(
)
,
]
)
;
}
$sequence
->
assign
(
[