wip: major refactoring
This commit is contained in:
1 parent
ae2ed306b9
commit
e7f0c09b36
32 files changed
+692
-466
No files matched your search
@@ -0,0 +1,40 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Form\Service\Factory;
|
||||
|
||||
use App\Form\ChoiceLoader\ParticipantRoomChoiceLoader;
|
||||
use App\Form\Model\ParticipantDto;
|
||||
use App\Form\Model\RoomSelectionDto;
|
||||
use Symfony\Component\Form\ChoiceList\Factory\ChoiceListFactoryInterface;
|
||||
|
||||
/**
|
||||
* Factory service for creating ParticipantRoomChoiceLoader instances.
|
||||
*/
|
||||
class ParticipantRoomChoiceLoaderFactory
|
||||
{
|
||||
public function __construct(
|
||||
private readonly ChoiceListFactoryInterface $choiceListFactory,
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a ParticipantRoomChoiceLoader for the given participant and room data.
|
||||
*
|
||||
* @param ParticipantDto[] $allParticipants
|
||||
* @param RoomSelectionDto[] $selectedRooms
|
||||
*/
|
||||
public function create(
|
||||
array $allParticipants,
|
||||
array $selectedRooms,
|
||||
int $participantIndex,
|
||||
): ParticipantRoomChoiceLoader {
|
||||
return new ParticipantRoomChoiceLoader(
|
||||
$this->choiceListFactory,
|
||||
$allParticipants,
|
||||
$selectedRooms,
|
||||
$participantIndex
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user