From fa216a64948d97b1e4e7d53c52ca9eddef1f5da7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Roulin?= Date: Thu, 3 Nov 2022 11:42:50 +0100 Subject: [PATCH] [FEATURE] Add signal before search in resultsAction --- Classes/Controller/SearchController.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Classes/Controller/SearchController.php b/Classes/Controller/SearchController.php index ad249860c0..d76ba2450e 100644 --- a/Classes/Controller/SearchController.php +++ b/Classes/Controller/SearchController.php @@ -105,8 +105,10 @@ public function resultsAction(): ResponseInterface $arguments = $this->request->getArguments(); $pageId = $this->typoScriptFrontendController->getRequestedId(); $languageId = Util::getLanguageUid(); - $searchRequest = $this->getSearchRequestBuilder()->buildForSearch($arguments, $pageId, $languageId); + $arguments = $this->emitActionSignal(__CLASS__, 'beforeSearch', [$arguments]); + + $searchRequest = $this->getSearchRequestBuilder()->buildForSearch($arguments, $pageId, $languageId); $searchResultSet = $this->searchService->search($searchRequest); // we pass the search result set to the controller context, to have the possibility