ProductListingCollectFilterEvent example


        $filters = new FilterCollection();

        foreach ($this->factories as $factory) {
            $filter = $factory->create($request$context);

            if ($filter !== null) {
                $filters->add($filter);
            }
        }

        $event = new ProductListingCollectFilterEvent($request$filters$context);
        $this->dispatcher->dispatch($event);

        return $filters;
    }

    /** * @return array<Aggregation> */
    private function getAggregations(Request $request, FilterCollection $filters): array
    {
        $aggregations = [];

        
Home | Imprint | This part of the site doesn't use cookies.