当前位置: 首页>>代码示例>>PHP>>正文


PHP ArticleMailTemplate::clearRecipients方法代码示例

本文整理汇总了PHP中ArticleMailTemplate::clearRecipients方法的典型用法代码示例。如果您正苦于以下问题:PHP ArticleMailTemplate::clearRecipients方法的具体用法?PHP ArticleMailTemplate::clearRecipients怎么用?PHP ArticleMailTemplate::clearRecipients使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ArticleMailTemplate的用法示例。


在下文中一共展示了ArticleMailTemplate::clearRecipients方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: bccEditorDecisionCommentToReviewers

 /**
  * Blind CC the editor decision email to reviewers.
  * @param $article object
  * @param $send boolean
  * @return boolean true iff ready for redirect
  */
 function bccEditorDecisionCommentToReviewers($article, $send, $request)
 {
     import('classes.mail.ArticleMailTemplate');
     $email = new ArticleMailTemplate($article, 'SUBMISSION_DECISION_REVIEWERS');
     if ($send && !$email->hasErrors()) {
         HookRegistry::call('SectionEditorAction::bccEditorDecisionCommentToReviewers', array(&$article, &$reviewAssignments, &$email));
         $email->send($request);
         return true;
     } else {
         if (!$request->getUserVar('continued')) {
             $userDao =& DAORegistry::getDAO('UserDAO');
             $reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
             $reviewAssignments =& $reviewAssignmentDao->getBySubmissionId($article->getId(), $article->getCurrentRound());
             $email->clearRecipients();
             foreach ($reviewAssignments as $reviewAssignment) {
                 if ($reviewAssignment->getDateCompleted() != null && !$reviewAssignment->getCancelled()) {
                     $reviewer =& $userDao->getUser($reviewAssignment->getReviewerId());
                     if (isset($reviewer)) {
                         $email->addBcc($reviewer->getEmail(), $reviewer->getFullName());
                     }
                 }
             }
             $commentsText = "";
             if ($article->getMostRecentEditorDecisionComment()) {
                 $comment = $article->getMostRecentEditorDecisionComment();
                 $commentsText = String::html2text($comment->getComments()) . "\n\n";
             }
             $user =& $request->getUser();
             $paramArray = array('comments' => $commentsText, 'editorialContactSignature' => $user->getContactSignature());
             $email->assignParams($paramArray);
         }
         $email->displayEditForm($request->url(null, null, 'bccEditorDecisionCommentToReviewers', 'send'), array('articleId' => $article->getId()));
         return false;
     }
 }
开发者ID:yuricampos,项目名称:ojs,代码行数:41,代码来源:SectionEditorAction.inc.php

示例2: email

 /**
  * Email the comment.
  * @param $recipients array of recipients (email address => name)
  */
 function email($recipients)
 {
     import('classes.mail.ArticleMailTemplate');
     $email = new ArticleMailTemplate($this->article, 'SUBMISSION_COMMENT');
     $journal =& Request::getJournal();
     if ($journal) {
         $email->setFrom($journal->getSetting('contactEmail'), $journal->getSetting('contactName'));
     }
     foreach ($recipients as $emailAddress => $name) {
         $email->addRecipient($emailAddress, $name);
         $email->setSubject(strip_tags($this->article->getLocalizedTitle()));
         $paramArray = array('name' => $name, 'commentName' => $this->user->getFullName(), 'comments' => String::html2text($this->getData('comments')));
         $email->assignParams($paramArray);
         $email->send();
         $email->clearRecipients();
     }
 }
开发者ID:ingmarschuster,项目名称:MindResearchRepository,代码行数:21,代码来源:EditCommentForm.inc.php

示例3: email

 /**
  * Email the comment.
  * @param $recipients array of recipients (email address => name)
  */
 function email($recipients)
 {
     $article = $this->article;
     $articleCommentDao =& DAORegistry::getDAO('ArticleCommentDAO');
     $journal =& Request::getJournal();
     import('mail.ArticleMailTemplate');
     $email = new ArticleMailTemplate($article, 'SUBMISSION_COMMENT');
     $email->setFrom($this->user->getEmail(), $this->user->getFullName());
     $commentText = $this->getData('comments');
     // Individually send an email to each of the recipients.
     foreach ($recipients as $emailAddress => $name) {
         $email->addRecipient($emailAddress, $name);
         $paramArray = array('name' => $name, 'commentName' => $this->user->getFullName(), 'comments' => $commentText);
         $email->sendWithParams($paramArray);
         $email->clearRecipients();
     }
 }
开发者ID:philschatz,项目名称:ojs,代码行数:21,代码来源:CommentForm.inc.php

示例4: blindCcReviewsToReviewers

 /**
  * Blind CC the reviews to reviewers.
  * @param $article object
  * @param $send boolean
  * @param $inhibitExistingEmail boolean
  * @return boolean true iff ready for redirect
  */
 function blindCcReviewsToReviewers($article, $send = false, $inhibitExistingEmail = false)
 {
     $commentDao =& DAORegistry::getDAO('ArticleCommentDAO');
     $reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
     $userDao =& DAORegistry::getDAO('UserDAO');
     $journal =& Request::getJournal();
     $comments =& $commentDao->getArticleComments($article->getId(), COMMENT_TYPE_EDITOR_DECISION);
     $reviewAssignments =& $reviewAssignmentDao->getBySubmissionId($article->getId(), $article->getCurrentRound());
     $commentsText = "";
     foreach ($comments as $comment) {
         $commentsText .= String::html2text($comment->getComments()) . "\n\n";
     }
     $user =& Request::getUser();
     import('classes.mail.ArticleMailTemplate');
     $email = new ArticleMailTemplate($article, 'SUBMISSION_DECISION_REVIEWERS', null, null, null, true, true);
     if ($send && !$email->hasErrors() && !$inhibitExistingEmail) {
         HookRegistry::call('SectionEditorAction::blindCcReviewsToReviewers', array(&$article, &$reviewAssignments, &$email));
         $email->send();
         return true;
     } else {
         if ($inhibitExistingEmail || !Request::getUserVar('continued')) {
             $email->clearRecipients();
             foreach ($reviewAssignments as $reviewAssignment) {
                 if ($reviewAssignment->getDateCompleted() != null && !$reviewAssignment->getCancelled()) {
                     $reviewer =& $userDao->getUser($reviewAssignment->getReviewerId());
                     if (isset($reviewer)) {
                         $email->addBcc($reviewer->getEmail(), $reviewer->getFullName());
                     }
                 }
             }
             $paramArray = array('comments' => $commentsText, 'editorialContactSignature' => $user->getContactSignature());
             $email->assignParams($paramArray);
         }
         $email->displayEditForm(Request::url(null, null, 'blindCcReviewsToReviewers'), array('articleId' => $article->getId()));
         return false;
     }
 }
开发者ID:ingmarschuster,项目名称:MindResearchRepository,代码行数:44,代码来源:SectionEditorAction.inc.php


注:本文中的ArticleMailTemplate::clearRecipients方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。