public function getParticipant(User $user)
    {
        foreach ($this->getParticipants() as $participant) {
            if ($participant->getUser()->getId() == $user->getId()) {
                return $participant;
            }
        }

        throw new NotFoundHttpException('Participant not found' . $user->getEmail());
    }
public function getParticipant(User $user)
    {
        foreach ($this->getParticipants() as $participant) {
            if ($participant->getUser()->getId() == $user->getId()) {
                return $participant;
            }
        }

        throw new NotFoundHttpException('Participant not found' . $user->getEmail());
    }
public function getParticipant ( User $ user ) { foreach ( $ this -> getParticipants ( ) as $ participant ) { if ( $ participant -> getUser ( ) -> getId ( ) == $ user -> getId ( ) ) { return $ participant ; } } throw new NotFoundHttpException ( 'Participant not found' . $ user -> getEmail ( ) ) ; }
Get a participant

@return ValidationParticipant
Get a participant