Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
validateAssociations example
$notices
[
$definition
->
getClass
(
)
]
=
array_merge_recursive
(
$violations
[
$definition
->
getClass
(
)
]
,
$this
->
validateDataFieldNotPrefixedByEntityName
(
$definition
)
)
;
$notices
[
$definition
->
getClass
(
)
]
=
array_merge_recursive
(
$violations
[
$definition
->
getClass
(
)
]
,
$this
->
checkParentDefinition
(
$definition
)
)
;
$violations
=
array_merge_recursive
(
$violations
,
$this
->
validateAssociations
(
$definition
)
)
;
if
(
is_subclass_of
(
$definition
, EntityTranslationDefinition::
class
)
)
{
$violations
=
array_merge_recursive
(
$violations
,
$this
->
validateEntityTranslationGettersAreNullable
(
$definition
)
)
;
$violations
=
array_merge_recursive
(
$violations
,
$this
->
validateEntityTranslationDefinitions
(
$definition
)
)
;
}
if
(
(
$parentDefinition
=
$definition
->
getParentDefinition
(
)
)
!== null
)
{
$violations
=
array_merge_recursive
(
$violations
,
$this
->
validateParentDefinitionAssociation
(
$definition
,
$parentDefinition
)
)
;
}
}