feat: basic themes for event sites

This commit is contained in:
Björn Fromme
2025-12-12 13:13:36 +01:00
parent b1ff6989ec
commit e9c1dd8b9d
28 changed files with 1158 additions and 157 deletions
+18
View File
@@ -6,8 +6,10 @@ use App\BusProNet\DataProvider\CountryDataProvider;
use App\Form\Model\BookingDto;
use App\Form\Service\CreateFieldStateProvider;
use App\Form\Service\EditFieldStateProvider;
use App\Service\BookingService;
use App\Service\ParticipantEligibilityService;
use Symfony\Component\Form\FormView;
use Symfony\Component\HttpFoundation\RequestStack;
use Twig\Environment;
use Twig\Extension\RuntimeExtensionInterface;
use Twig\Extra\Intl\IntlExtension;
@@ -20,6 +22,7 @@ class AppRuntime implements RuntimeExtensionInterface
private readonly ParticipantEligibilityService $participantEligibilityService,
private readonly CreateFieldStateProvider $createFieldStateProvider,
private readonly EditFieldStateProvider $editFieldStateProvider,
private readonly RequestStack $requestStack,
private readonly string $environment,
) {
}
@@ -211,6 +214,21 @@ class AppRuntime implements RuntimeExtensionInterface
return $labels;
}
/**
* Returns the current booking theme from session.
*
* Defaults to 'base' if no theme is set.
*/
public function getBookingTheme(): string
{
$request = $this->requestStack->getCurrentRequest();
if (null === $request) {
return BookingService::DEFAULT_THEME;
}
return $request->getSession()->get(BookingService::THEME_KEY, BookingService::DEFAULT_THEME);
}
/**
* Gets the appropriate field state provider based on booking mode.
*