diff --git a/Classes/Controller/SearchController.php b/Classes/Controller/SearchController.php index 3c624001c5..4760d99838 100644 --- a/Classes/Controller/SearchController.php +++ b/Classes/Controller/SearchController.php @@ -143,6 +143,7 @@ public function resultsAction(): ResponseInterface 'arguments' => $afterSearchEvent->getArguments(), 'pagination' => $afterSearchEvent->getPagination(), 'currentPage' => $afterSearchEvent->getCurrentPage(), + 'additionalVariables' => $afterSearchEvent->getAdditionalVariables(), ]; $this->view->assignMultiple($values); diff --git a/Classes/Event/Search/BeforeSearchResultIsShownEvent.php b/Classes/Event/Search/BeforeSearchResultIsShownEvent.php index 7ddbeab6c2..0ccf4c308c 100644 --- a/Classes/Event/Search/BeforeSearchResultIsShownEvent.php +++ b/Classes/Event/Search/BeforeSearchResultIsShownEvent.php @@ -33,6 +33,7 @@ final class BeforeSearchResultIsShownEvent private array $arguments; protected PaginationInterface $pagination; private int $currentPage; + protected array $additionalVariables = []; public function __construct( SearchResultSet $resultSet, @@ -84,4 +85,14 @@ public function setPagination(PaginationInterface $pagination): void { $this->pagination = $pagination; } + + public function getAdditionalVariables(): array + { + return $this->additionalVariables; + } + + public function setAdditionalVariables(array $additionalVariables): void + { + $this->additionalVariables = $additionalVariables; + } }