Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
filtered example
$aggregations
=
[
]
;
if
(
$request
->
get
(
'reduce-aggregations'
)
=== null
)
{
foreach
(
$filters
as
$filter
)
{
$aggregations
=
array_merge
(
$aggregations
,
$filter
->
getAggregations
(
)
)
;
}
return
$aggregations
;
}
foreach
(
$filters
as
$filter
)
{
$excluded
=
$filters
->
filtered
(
)
;
if
(
$filter
->
exclude
(
)
)
{
$excluded
=
$excluded
->
blacklist
(
$filter
->
getName
(
)
)
;
}
foreach
(
$filter
->
getAggregations
(
)
as
$aggregation
)
{
if
(
$aggregation
instanceof FilterAggregation
)
{
$aggregation
->
addFilters
(
$excluded
->
getFilters
(
)
)
;
$aggregations
[
]
=
$aggregation
;