wip: form refactoring

This commit is contained in:
Björn Fromme
2026-03-16 11:59:09 +01:00
parent 65a33922cf
commit d719b17aec
13 changed files with 158 additions and 100 deletions
+7 -3
View File
@@ -5,10 +5,10 @@ declare(strict_types=1);
namespace App\Form\Service;
use App\Form\Model\BookingDtoInterface;
use App\Form\ParticipantFieldHandler\Condition\FieldConditionInterface;
use App\Form\ParticipantFieldHandler\Condition\MutabilityCondition;
use App\Form\ParticipantFieldHandler\Condition\ApplicantCondition;
use App\Form\ParticipantFieldHandler\Condition\CompositeCondition;
use App\Form\ParticipantFieldHandler\Condition\FieldConditionInterface;
use App\Form\ParticipantFieldHandler\Condition\MutabilityCondition;
/**
* Field state provider for the booking edit workflow.
@@ -21,6 +21,8 @@ use App\Form\ParticipantFieldHandler\Condition\CompositeCondition;
*/
class EditFieldStateProvider implements FieldStateProviderInterface
{
use FormTraversalTrait;
/** @var array<string, array<string, FieldConditionInterface>> */
private array $fieldStateConditions = [];
@@ -109,6 +111,7 @@ class EditFieldStateProvider implements FieldStateProviderInterface
foreach ($this->fieldStateConditions[$fieldName] as $condition) {
$dependencies = array_merge($dependencies, $condition->getDependentFields());
}
return array_unique($dependencies);
}
@@ -121,6 +124,7 @@ class EditFieldStateProvider implements FieldStateProviderInterface
$allStates[$fieldName] = $fieldState;
}
}
return $allStates;
}
}
}