Skip to content

Commit

Permalink
Expose settings via DateSearchVariables Event
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielSiepmann committed Jun 26, 2024
1 parent 2b6682f commit a47383d
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
1 change: 1 addition & 0 deletions Classes/Controller/DateController.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public function searchAction(array $search = []): ResponseInterface
}

$event = $this->eventDispatcher->dispatch(new DateSearchVariables(
$this->settings,
$search,
$demand,
$this->regionRepository->findAll(),
Expand Down
6 changes: 6 additions & 0 deletions Classes/Events/Controller/DateSearchVariables.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ final class DateSearchVariables
* @param array<Category> $features
*/
public function __construct(
private readonly array $settings,
private readonly array $search,
private readonly DateDemand $demand,
private readonly QueryResultInterface $regions,
Expand All @@ -27,6 +28,11 @@ public function __construct(
) {
}

public function getSettings(): array
{
return $this->settings;
}

public function getSearch(): array
{
return $this->search;
Expand Down
27 changes: 27 additions & 0 deletions Documentation/Changelog/3.8.0.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
3.8.0
=====

Breaking
--------

Nothing

Features
--------

* Expose settings via `DateSearchVariables` Event.

Fixes
-----

Nothing

Tasks
-----

Nothing

Deprecation
-----------

Nothing

0 comments on commit a47383d

Please sign in to comment.