wip: modernized edit flow

This commit is contained in:
Björn Fromme
2026-03-16 11:59:10 +01:00
parent 0d073a36a3
commit 28831a3b06
75 changed files with 1662 additions and 747 deletions
@@ -4,7 +4,7 @@ declare(strict_types=1);
namespace App\Form\Service\Trait;
use App\Form\Model\BookingDtoInterface;
use App\Form\Model\BookingDto;
use Symfony\Component\Form\FormInterface;
/**
@@ -17,17 +17,17 @@ use Symfony\Component\Form\FormInterface;
trait FormTraversalTrait
{
/**
* Gets the BookingDtoInterface from the root of the form tree.
* Gets the BookingDto from the root of the form tree.
*
* This helper method traverses up the form tree to find the root form
* and extracts the BookingDtoInterface data. This is shared logic used
* and extracts the BookingDto data. This is shared logic used
* by both create and edit participant forms.
*
* @param FormInterface $form The form to start traversing from
*
* @return BookingDtoInterface|null The booking DTO or null if not found
* @return BookingDto|null The booking DTO or null if not found
*/
public function getBookingDtoFromForm(FormInterface $form): ?BookingDtoInterface
public function getBookingDtoFromForm(FormInterface $form): ?BookingDto
{
// Traverse up the form tree to get the root form's data
$rootForm = $form;
@@ -37,6 +37,6 @@ trait FormTraversalTrait
$data = $rootForm->getData();
return $data instanceof BookingDtoInterface ? $data : null;
return $data instanceof BookingDto ? $data : null;
}
}