SuggestPageLoadedEvent example

$criteria->setLimit(10);
        $criteria->setTotalCountMode(Criteria::TOTAL_COUNT_MODE_EXACT);
        $page->setSearchResult(
            $this->productSuggestRoute
                ->load($request$salesChannelContext$criteria)
                ->getListingResult()
        );

        $page->setSearchTerm((string) $request->query->get('search'));

        $this->eventDispatcher->dispatch(
            new SuggestPageLoadedEvent($page$salesChannelContext$request)
        );

        return $page;
    }
}
Home | Imprint | This part of the site doesn't use cookies.