$formData Current form data (unused) * * @return bool True if the participant needs their own email address */ public function evaluate(BookingDto $bookingDto, int $participantIndex, array $formData): bool { return $bookingDto->requiresParticipantEmail($participantIndex); } /** * The rule reads the date of birth, so the state has to be recalculated when it changes. * * @return string[] Array containing 'dateOfBirth' */ public function getDependentFields(): array { return ['dateOfBirth']; } public function getDescription(): string { return 'Checks if the participant needs an email address of their own'; } }