/**
  * @param IPresentationSpeaker $speaker
  * @param string $email
  * @return ISpeakerRegistrationRequest
  */
 public function build(IPresentationSpeaker $speaker, $email)
 {
     $request = new SpeakerRegistrationRequest();
     $request->Email = $email;
     $request->IsConfirmed = false;
     $request->SpeakerID = $speaker->getIdentifier();
     $request->ProposerID = Member::currentUserID();
     $request->generateConfirmationToken();
     return $request;
 }
 /**
  * @param IPresentationSpeaker $speaker
  * @param string $email
  * @return ISpeakerRegistrationRequest
  */
 public function build(IPresentationSpeaker $speaker, $email)
 {
     $request = new SpeakerRegistrationRequest();
     $request->Email = $email;
     $request->IsConfirmed = false;
     $request->SpeakerID = $speaker->getIdentifier();
     $request->ProposerID = Member::currentUserID();
     $already_exists = false;
     do {
         $token = $request->generateConfirmationToken();
         $already_exists = $this->repository->existsConfirmationToken($token);
     } while ($already_exists);
     return $request;
 }
Пример #3
0
 /**
  * @param IPresentationSpeaker $speaker
  * @return bool
  */
 public function isModerator(IPresentationSpeaker $speaker)
 {
     return $this->isModeratorByID($speaker->getIdentifier());
 }
 /**
  * @param IPresentationSpeaker $speaker
  * @return $this
  */
 public function assignSpeaker(IPresentationSpeaker $speaker)
 {
     $this->SpeakerID = $speaker->getIdentifier();
     AssociationFactory::getInstance()->getMany2OneAssociation($this, 'Speaker')->setTarget($speaker);
 }