Files
myep/src/Model/PurchaseFlow.php
T
2026-10-01 15:03:27 +02:00

31 lines
696 B
PHP

<?php
declare(strict_types=1);
namespace App\Model;
/**
* The purchase flows that start on the login page (optional sign-in, or continue as a guest).
*/
enum PurchaseFlow: string
{
case Booking = 'booking';
case Voucher = 'voucher';
public function firstStepRoute(): string
{
return match ($this) {
self::Booking => 'app_booking_create_step_1',
self::Voucher => 'app_voucher_step_1',
};
}
public function authenticateTemplate(): string
{
return match ($this) {
self::Booking => 'booking/create/authenticate.html.twig',
self::Voucher => 'voucher/authenticate.html.twig',
};
}
}