public function create(Request
$request, SalesChannelContext
$context): ?Filter
{ if (!
$request->request->
get('manufacturer-filter', true
)) { return null;
} $ids =
$this->
getManufacturerIds($request);
return new Filter( 'manufacturer',
!
empty($ids),
[new EntityAggregation('manufacturer', 'product.manufacturerId', 'product_manufacturer'
)],
new EqualsAnyFilter('product.manufacturerId',
$ids),
$ids );
} /**
* @return list<string>
*/
private function getManufacturerIds(Request
$request): array
{ $ids =
$request->query->
get('manufacturer', ''
);