-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Description
The SearchController no longer passes any settings to the DayRepository, which means that the settings are no longer taken into account in the results.
In this specific case, we have expanded FlexForm with options that respond to the added option via a listener on ModifyQueriesOfSearchEventsEvent.
However, the $settings array in Event is always empty :-(
...unless the SearchController passes its settings to DayRepository:
After
public function listSearchResultsAction(?Search $search = null): ResponseInterface
{
if ($search instanceof Search) {
$this->dayRepository->setSettings($this->settings);
$days = $this->dayRepository->searchEvents($search);
$this->postProcessAndAssignFluidVariables([
'days' => $days,
]);
$this->cacheService->addPageCacheTagsByQuery($days->getQuery());
}
return $this->htmlResponse();
}
Before
public function listSearchResultsAction(?Search $search = null): ResponseInterface
{
if ($search instanceof Search) {
$days = $this->dayRepository->searchEvents($search);
$this->postProcessAndAssignFluidVariables([
'days' => $days,
]);
$this->cacheService->addPageCacheTagsByQuery($days->getQuery());
}
return $this->htmlResponse();
}
Metadata
Metadata
Assignees
Labels
No labels