Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
setIsStringValue example
if
(
$x
->access_path
)
{
$base_obj
->access_path = '(string) '.
$x
->access_path;
}
$value
=
(string)
$var
;
$s
=
$this
->parser->
parse
(
$value
,
$base_obj
)
;
$srep
=
$s
->
getRepresentation
(
'contents'
)
;
$svalrep
=
$s
->value && 'contents' ==
$s
->value->
getName
(
)
?
$s
->value : null;
if
(
$srep
||
$svalrep
)
{
$x
->
setIsStringValue
(
true
)
;
$x
->value =
$srep
?:
$svalrep
;
if
(
$srep
)
{
$x
->
replaceRepresentation
(
$srep
, 0
)
;
}
}
$reps
= \
array_reverse
(
$s
->
getRepresentations
(
)
)
;
foreach
(
$reps
as
$rep
)
{
$x
->
addRepresentation
(
$rep
, 0
)
;
}