You are a developer and looking for Shopware projects?
Apply Now!
getArrayStore example
if
(
$snippet
=
$snippets
->
get
(
$key
. 'label'
)
)
{
$column
->
setLabel
(
$snippet
)
;
}
if
(
$snippet
=
$snippets
->
get
(
$key
. 'supportText'
)
)
{
$column
->
setSupportText
(
$snippet
)
;
}
if
(
$snippet
=
$snippets
->
get
(
$key
. 'helpText'
)
)
{
$column
->
setHelpText
(
$snippet
)
;
}
$arrayStore
=
json_decode
(
$column
->
getArrayStore
(
)
, true
)
;
if
(
!
empty
(
$arrayStore
)
)
{
foreach
(
$arrayStore
as
&
$option
)
{
$optionKey
=
sprintf
(
'%soptions_store_%s',
$key
,
strtolower
(
$option
[
'key'
]
)
)
;
$option
[
'value'
]
=
$snippets
->
get
(
$optionKey
,
$option
[
'value'
]
)
;
}
unset
(
$option
)
;
$column
->
setArrayStore
(
json_encode
(
$arrayStore
)
)
;
}
}
}
}