SearchPageLoadedEvent example

$result = $this->productSearchRoute
            ->load($request$salesChannelContext$criteria)
            ->getListingResult();

        $page->setListing($result);

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

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

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