Esempio n. 1
0
 /**
  * Notify participants that this competition is open for voting
  * @since Version 3.9.1
  * @return \Railpage\Images\Competition
  * @todo Check recipient preferences for email notifications
  */
 private function notifyVotingOpen()
 {
     /**
      * Return if we're not within the voting bounds
      */
     if (!Utility\CompetitionUtility::isVotingWindowOpen($this)) {
         return $this;
     }
     $body = sprintf("Hi [username],\n\nWe wanted to let you know that the <a href='%s'>%s</a> photo competition is open for voting until %s.\n\nYou've received this email because you've participated in a previous photo competition.\n\nThanks\nThe Railpage team.", $this->url->email, $this->title, $this->VotingDateClose->format("F jS"));
     $notificationOptions = array("flag" => __FUNCTION__, "subject" => sprintf("Voting open: %s", $this->title), "body" => $body);
     Utility\CompetitionUtility::sendNotification($this, $notificationOptions);
     return $this;
 }