$formData Current form data for condition evaluation * * @return bool True if participant is ineligible (no skipasses available for their age) */ public function evaluate(BookingDto $bookingDto, int $participantIndex, array $formData): bool { // Invert the eligibility check since conditions typically evaluate to TRUE for "hide" // isParticipantEligible() returns TRUE when eligible, we need TRUE when INELIGIBLE return !$this->participantEligibilityService->isParticipantEligible($bookingDto, $participantIndex); } /** * Returns field names that this condition depends on. * * This condition depends on the dateOfBirth field since eligibility * is determined by age-based skipass availability. * * @return string[] Array containing field names this condition depends on */ public function getDependentFields(): array { return ['dateOfBirth']; } /** * Returns a human-readable description of this condition. * * @return string Description of the booking eligibility condition */ public function getDescription(): string { return 'Participant has no available skipasses for their age'; } }