Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
getValueExpression example
$propertyNameValueExpr
=
$node
->
getArgs
(
)
[
$propertyNameParamPosition
]
->value;
if
(
$scope
->
getType
(
$autoloadValueExpr
)
->
isTrue
(
)
->
yes
(
)
)
{
$definitionClassReflection
=
$scope
->
getClassReflection
(
)
->
getNativeReflection
(
)
;
$constant
=
$definitionClassReflection
->
getReflectionConstant
(
'ENTITY_NAME'
)
;
if
(
$constant
=== false
)
{
return
[
]
;
}
$constantValue
=
$constant
->
getValueExpression
(
)
;
if
(
!
$constantValue
instanceof String_
)
{
return
[
]
;
}
$propType
=
$scope
->
getType
(
$propertyNameValueExpr
)
;
if
(
$propType
->
getConstantStrings
(
)
===
[
]
)
{
return
[
]
;
}
return
[
RuleErrorBuilder::
message
(
sprintf
(