$submittedData The submitted participant form data * @param string $mode The booking mode (BookingDto::MODE_CREATE or MODE_EDIT) * @param int $participantIndex The index of the participant being processed * * @return bool True if this is the applicant, false otherwise */ public function shouldProcess(array $submittedData, string $mode, int $participantIndex): bool { return 0 === $participantIndex; // Only process for applicant } /** * Processes the bulk insurance booking checkbox for the applicant. * * This handler ONLY stores the checkbox state. The actual insurance assignment * to dependent participants is handled by BookingDataProcessor during API submission. * * @param array $submittedData The submitted participant form data * @param BookingDto $bookingDto The booking DTO to update * @param int $participantIndex The index of the participant (must be 0) */ public function processField(array $submittedData, BookingDto $bookingDto, int $participantIndex): void { $participant = $this->getParticipant($bookingDto, $participantIndex); if (null === $participant) { return; } // Get checkbox value from submitted data and store it $bulkInsuranceBooking = $this->getFieldValue($submittedData, $this->getFieldName()); $participant->bulkInsuranceBooking = (bool) $bulkInsuranceBooking; } }