Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
hydrateValues example
$query
->
andWhere
(
'propertySet.id IN (:filterSetIds)'
)
->
setParameter
(
':filterSetIds',
$filterGroupIds
, Connection::PARAM_INT_ARRAY
)
;
}
$this
->fieldHelper->
addMediaTranslation
(
$query
,
$context
)
;
$this
->fieldHelper->
addPropertySetTranslation
(
$query
,
$context
)
;
$this
->fieldHelper->
addPropertyGroupTranslation
(
$query
,
$context
)
;
$this
->fieldHelper->
addPropertyOptionTranslation
(
$query
,
$context
)
;
$rows
=
$query
->
execute
(
)
->
fetchAll
(
PDO::FETCH_ASSOC
)
;
return
$this
->propertyHydrator->
hydrateValues
(
$rows
)
;
}
}
->
orderBy
(
'filterArticles.articleID'
)
;
$this
->fieldHelper->
addPropertySetTranslation
(
$query
,
$context
)
;
$this
->fieldHelper->
addPropertyGroupTranslation
(
$query
,
$context
)
;
$this
->fieldHelper->
addPropertyOptionTranslation
(
$query
,
$context
)
;
$this
->fieldHelper->
addMediaTranslation
(
$query
,
$context
)
;
$data
=
$query
->
execute
(
)
->
fetchAll
(
PDO::FETCH_GROUP
)
;
$properties
=
[
]
;
foreach
(
$data
as
$productId
=>
$values
)
{
$properties
[
$productId
]
=
$this
->propertyHydrator->
hydrateValues
(
$values
)
;
}
$result
=
[
]
;
foreach
(
$products
as
$product
)
{
if
(
!
isset
(
$properties
[
$product
->
getId
(
)
]
)
)
{
continue
;
}
$sets
=
$properties
[
$product
->
getId
(
)
]
;
$set
=
array_shift
(
$sets
)
;
if
(
!
$set
instanceof Set
)
{
continue
;
}