wip: backport form handing system from create flow to edit flow

This commit is contained in:
Björn Fromme
2025-10-04 12:12:16 +02:00
parent cd82b70139
commit fc93b28af0
10 changed files with 1369 additions and 220 deletions
@@ -0,0 +1,29 @@
<?php
declare(strict_types=1);
namespace App\Form\Service\Condition;
use App\Form\Model\BookingDtoInterface;
use App\Form\Service\Contract\FieldConditionInterface;
/**
* Condition that checks if additional services are mutable in the edit flow.
*/
class AdditionalServicesMutabilityCondition implements FieldConditionInterface
{
public function evaluate(BookingDtoInterface $bookingDto, int $participantIndex, array $formData): bool
{
return false === $bookingDto->travel->additionalServicesMutable;
}
public function getDependentFields(): array
{
return [];
}
public function getDescription(): string
{
return 'Additional services are not mutable (edit flow)';
}
}