$submittedData The submitted participant form data * @param BookingDtoInterface $bookingDto The booking DTO to update (create or edit) * @param int $participantIndex The index of the participant being processed */ public function processField(array $submittedData, BookingDtoInterface $bookingDto, int $participantIndex): void { // Safely get the participant object, returning early if not found $participant = $this->getParticipant($bookingDto, $participantIndex); if (null === $participant) { return; } // Extract the room ID from form data (defaults to null if not present) $roomId = $this->getFieldValue($submittedData, $this->getFieldName()); // Convert form string to integer, handling empty selections as null $participant->assignedRoomId = $this->normalizeIntValue($roomId); } }