From a47383db3dc730ed83608c121da68a602209bb1a Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Wed, 26 Jun 2024 13:51:45 +0200 Subject: [PATCH] Expose settings via `DateSearchVariables` Event --- Classes/Controller/DateController.php | 1 + .../Events/Controller/DateSearchVariables.php | 6 +++++ Documentation/Changelog/3.8.0.rst | 27 +++++++++++++++++++ 3 files changed, 34 insertions(+) create mode 100644 Documentation/Changelog/3.8.0.rst diff --git a/Classes/Controller/DateController.php b/Classes/Controller/DateController.php index 1e90b7a..37c6fce 100644 --- a/Classes/Controller/DateController.php +++ b/Classes/Controller/DateController.php @@ -83,6 +83,7 @@ public function searchAction(array $search = []): ResponseInterface } $event = $this->eventDispatcher->dispatch(new DateSearchVariables( + $this->settings, $search, $demand, $this->regionRepository->findAll(), diff --git a/Classes/Events/Controller/DateSearchVariables.php b/Classes/Events/Controller/DateSearchVariables.php index ba2dd10..09af86d 100644 --- a/Classes/Events/Controller/DateSearchVariables.php +++ b/Classes/Events/Controller/DateSearchVariables.php @@ -19,6 +19,7 @@ final class DateSearchVariables * @param array $features */ public function __construct( + private readonly array $settings, private readonly array $search, private readonly DateDemand $demand, private readonly QueryResultInterface $regions, @@ -27,6 +28,11 @@ public function __construct( ) { } + public function getSettings(): array + { + return $this->settings; + } + public function getSearch(): array { return $this->search; diff --git a/Documentation/Changelog/3.8.0.rst b/Documentation/Changelog/3.8.0.rst new file mode 100644 index 0000000..5ef18ea --- /dev/null +++ b/Documentation/Changelog/3.8.0.rst @@ -0,0 +1,27 @@ +3.8.0 +===== + +Breaking +-------- + +Nothing + +Features +-------- + +* Expose settings via `DateSearchVariables` Event. + +Fixes +----- + +Nothing + +Tasks +----- + +Nothing + +Deprecation +----------- + +Nothing