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


PHP ArticleMailTemplate::ccAssignedEditingSectionEditors方法代码示例

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


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

示例1: completeCopyedit

 /**
  * Copyeditor completes initial copyedit.
  * @param $copyeditorSubmission object
  */
 function completeCopyedit($copyeditorSubmission, $send = false)
 {
     $copyeditorSubmissionDao =& DAORegistry::getDAO('CopyeditorSubmissionDAO');
     $signoffDao =& DAORegistry::getDAO('SignoffDAO');
     $userDao =& DAORegistry::getDAO('UserDAO');
     $journal =& Request::getJournal();
     $initialSignoff = $signoffDao->build('SIGNOFF_COPYEDITING_INITIAL', ASSOC_TYPE_ARTICLE, $copyeditorSubmission->getArticleId());
     if ($initialSignoff->getDateCompleted() != null) {
         return true;
     }
     $user =& Request::getUser();
     import('classes.mail.ArticleMailTemplate');
     $email = new ArticleMailTemplate($copyeditorSubmission, 'COPYEDIT_COMPLETE');
     $editAssignments = $copyeditorSubmission->getEditAssignments();
     $author = $copyeditorSubmission->getUser();
     if (!$email->isEnabled() || $send && !$email->hasErrors()) {
         HookRegistry::call('CopyeditorAction::completeCopyedit', array(&$copyeditorSubmission, &$editAssignments, &$author, &$email));
         if ($email->isEnabled()) {
             $email->setAssoc(ARTICLE_EMAIL_COPYEDIT_NOTIFY_COMPLETE, ARTICLE_EMAIL_TYPE_COPYEDIT, $copyeditorSubmission->getArticleId());
             $email->send();
         }
         $initialSignoff->setDateCompleted(Core::getCurrentDate());
         $authorSignoff = $signoffDao->build('SIGNOFF_COPYEDITING_AUTHOR', ASSOC_TYPE_ARTICLE, $copyeditorSubmission->getArticleId());
         $authorSignoff->setUserId($author->getId());
         $authorSignoff->setDateNotified(Core::getCurrentDate());
         $signoffDao->updateObject($initialSignoff);
         $signoffDao->updateObject($authorSignoff);
         // Add log entry
         import('classes.article.log.ArticleLog');
         import('classes.article.log.ArticleEventLogEntry');
         ArticleLog::logEvent($copyeditorSubmission->getArticleId(), ARTICLE_LOG_COPYEDIT_INITIAL, ARTICLE_LOG_TYPE_COPYEDIT, $user->getId(), 'log.copyedit.initialEditComplete', array('copyeditorName' => $user->getFullName(), 'articleId' => $copyeditorSubmission->getArticleId()));
         return true;
     } else {
         if (!Request::getUserVar('continued')) {
             $email->addRecipient($author->getEmail(), $author->getFullName());
             $email->ccAssignedEditingSectionEditors($copyeditorSubmission->getArticleId());
             $email->ccAssignedEditors($copyeditorSubmission->getArticleId());
             $paramArray = array('editorialContactName' => $author->getFullName(), 'copyeditorName' => $user->getFullName(), 'authorUsername' => $author->getUsername(), 'submissionEditingUrl' => Request::url(null, 'author', 'submissionEditing', array($copyeditorSubmission->getArticleId())));
             $email->assignParams($paramArray);
         }
         $email->displayEditForm(Request::url(null, 'copyeditor', 'completeCopyedit', 'send'), array('articleId' => $copyeditorSubmission->getArticleId()));
         return false;
     }
 }
开发者ID:master3395,项目名称:CBPPlatform,代码行数:48,代码来源:CopyeditorAction.inc.php

示例2: completeAuthorCopyedit

 /**
  * Author completes editor / author review.
  * @param $authorSubmission object
  * @param $send boolean
  * @param $request object
  */
 function completeAuthorCopyedit($authorSubmission, $send, $request)
 {
     $authorSubmissionDao =& DAORegistry::getDAO('AuthorSubmissionDAO');
     $signoffDao =& DAORegistry::getDAO('SignoffDAO');
     $userDao =& DAORegistry::getDAO('UserDAO');
     $journal =& $request->getJournal();
     $authorSignoff = $signoffDao->build('SIGNOFF_COPYEDITING_AUTHOR', ASSOC_TYPE_ARTICLE, $authorSubmission->getId());
     if ($authorSignoff->getDateCompleted() != null) {
         return true;
     }
     $user =& $request->getUser();
     import('classes.mail.ArticleMailTemplate');
     $email = new ArticleMailTemplate($authorSubmission, 'COPYEDIT_AUTHOR_COMPLETE');
     $editAssignments = $authorSubmission->getEditAssignments();
     $copyeditor = $authorSubmission->getUserBySignoffType('SIGNOFF_COPYEDITING_INITIAL');
     if (!$email->isEnabled() || $send && !$email->hasErrors()) {
         HookRegistry::call('AuthorAction::completeAuthorCopyedit', array(&$authorSubmission, &$email));
         if ($email->isEnabled()) {
             $email->send($request);
         }
         $authorSignoff->setDateCompleted(Core::getCurrentDate());
         $finalSignoff = $signoffDao->build('SIGNOFF_COPYEDITING_FINAL', ASSOC_TYPE_ARTICLE, $authorSubmission->getId());
         if ($copyeditor) {
             $finalSignoff->setUserId($copyeditor->getId());
         }
         $finalSignoff->setDateNotified(Core::getCurrentDate());
         $signoffDao->updateObject($authorSignoff);
         $signoffDao->updateObject($finalSignoff);
         // Add log entry
         import('classes.article.log.ArticleLog');
         ArticleLog::logEvent($request, $authorSubmission, ARTICLE_LOG_COPYEDIT_REVISION, 'log.copyedit.authorFile');
         return true;
     } else {
         if (!$request->getUserVar('continued')) {
             if (isset($copyeditor)) {
                 $email->addRecipient($copyeditor->getEmail(), $copyeditor->getFullName());
                 $assignedSectionEditors = $email->ccAssignedEditingSectionEditors($authorSubmission->getId());
                 $assignedEditors = $email->ccAssignedEditors($authorSubmission->getId());
                 if (empty($assignedSectionEditors) && empty($assignedEditors)) {
                     $email->addCc($journal->getSetting('contactEmail'), $journal->getSetting('contactName'));
                     $editorName = $journal->getSetting('contactName');
                 } else {
                     $editor = array_shift($assignedSectionEditors);
                     if (!$editor) {
                         $editor = array_shift($assignedEditors);
                     }
                     $editorName = $editor->getEditorFullName();
                 }
             } else {
                 $assignedSectionEditors = $email->toAssignedEditingSectionEditors($authorSubmission->getId());
                 $assignedEditors = $email->ccAssignedEditors($authorSubmission->getId());
                 if (empty($assignedSectionEditors) && empty($assignedEditors)) {
                     $email->addRecipient($journal->getSetting('contactEmail'), $journal->getSetting('contactName'));
                     $editorName = $journal->getSetting('contactName');
                 } else {
                     $editor = array_shift($assignedSectionEditors);
                     if (!$editor) {
                         $editor = array_shift($assignedEditors);
                     }
                     $editorName = $editor->getEditorFullName();
                 }
             }
             $paramArray = array('editorialContactName' => isset($copyeditor) ? $copyeditor->getFullName() : $editorName, 'authorName' => $user->getFullName());
             $email->assignParams($paramArray);
         }
         $email->displayEditForm($request->url(null, 'author', 'completeAuthorCopyedit', 'send'), array('articleId' => $authorSubmission->getId()));
         return false;
     }
 }
开发者ID:jasonzou,项目名称:OJS-2.4.6,代码行数:75,代码来源:AuthorAction.inc.php

示例3: proofreadEmail

 /**
  * Proofread Emails
  * @param $articleId int
  * @param $mailType defined string - type of proofread mail being sent
  * @param $request object
  * @param $actionPath string - form action
  * @return true iff ready for a redirect
  */
 function proofreadEmail($articleId, $mailType, $request, $actionPath = '')
 {
     $signoffDao =& DAORegistry::getDAO('SignoffDAO');
     $sectionEditorSubmissionDao =& DAORegistry::getDAO('SectionEditorSubmissionDAO');
     $sectionEditorSubmission =& $sectionEditorSubmissionDao->getSectionEditorSubmission($articleId);
     $userDao =& DAORegistry::getDAO('UserDAO');
     $journal =& Request::getJournal();
     $user =& Request::getUser();
     $ccs = array();
     import('classes.mail.ArticleMailTemplate');
     $email = new ArticleMailTemplate($sectionEditorSubmission, $mailType);
     switch ($mailType) {
         case 'PROOFREAD_AUTHOR_REQUEST':
             $eventType = ARTICLE_EMAIL_PROOFREAD_NOTIFY_AUTHOR;
             $signoffType = 'SIGNOFF_PROOFREADING_AUTHOR';
             $setDateField = 'setDateNotified';
             $nullifyDateFields = array('setDateUnderway', 'setDateCompleted', 'setDateAcknowledged');
             $setUserId = $sectionEditorSubmission->getUserId();
             $receiver =& $userDao->getUser($setUserId);
             $setUserId = $receiver;
             if (!isset($receiver)) {
                 return true;
             }
             $receiverName = $receiver->getFullName();
             $receiverAddress = $receiver->getEmail();
             $email->ccAssignedEditingSectionEditors($sectionEditorSubmission->getId());
             $addParamArray = array('authorName' => $receiver->getFullName(), 'authorUsername' => $receiver->getUsername(), 'authorPassword' => $receiver->getPassword(), 'editorialContactSignature' => $user->getContactSignature(), 'submissionUrl' => Request::url(null, 'author', 'submissionEditing', $articleId));
             break;
         case 'PROOFREAD_AUTHOR_ACK':
             $eventType = ARTICLE_EMAIL_PROOFREAD_THANK_AUTHOR;
             $signoffType = 'SIGNOFF_PROOFREADING_AUTHOR';
             $setDateField = 'setDateAcknowledged';
             $receiver =& $userDao->getUser($sectionEditorSubmission->getUserId());
             if (!isset($receiver)) {
                 return true;
             }
             $receiverName = $receiver->getFullName();
             $receiverAddress = $receiver->getEmail();
             $email->ccAssignedEditingSectionEditors($sectionEditorSubmission->getId());
             $addParamArray = array('authorName' => $receiver->getFullName(), 'editorialContactSignature' => $user->getContactSignature());
             break;
         case 'PROOFREAD_AUTHOR_COMPLETE':
             $eventType = ARTICLE_EMAIL_PROOFREAD_NOTIFY_AUTHOR_COMPLETE;
             $signoffType = 'SIGNOFF_PROOFREADING_AUTHOR';
             $setDateField = 'setDateCompleted';
             $getDateField = 'getDateCompleted';
             $editAssignments =& $sectionEditorSubmission->getEditAssignments();
             $nextSignoff = $signoffDao->build('SIGNOFF_PROOFREADING_PROOFREADER', ASSOC_TYPE_ARTICLE, $articleId);
             if ($nextSignoff->getUserId() != 0) {
                 $setNextDateField = 'setDateNotified';
                 $proofreader =& $userDao->getUser($nextSignoff->getUserId());
                 $receiverName = $proofreader->getFullName();
                 $receiverAddress = $proofreader->getEmail();
                 $editorAdded = false;
                 foreach ($editAssignments as $editAssignment) {
                     if ($editAssignment->getIsEditor() || $editAssignment->getCanEdit()) {
                         $ccs[$editAssignment->getEditorEmail()] = $editAssignment->getEditorFullName();
                         $editorAdded = true;
                     }
                 }
                 if (!$editorAdded) {
                     $ccs[$journal->getSetting('contactEmail')] = $journal->getSetting('contactName');
                 }
             } else {
                 $editorAdded = false;
                 $assignmentIndex = 0;
                 foreach ($editAssignments as $editAssignment) {
                     if ($editAssignment->getIsEditor() || $editAssignment->getCanEdit()) {
                         if ($assignmentIndex++ == 0) {
                             $receiverName = $editAssignment->getEditorFullName();
                             $receiverAddress = $editAssignment->getEditorEmail();
                         } else {
                             $ccs[$editAssignment->getEditorEmail()] = $editAssignment->getEditorFullName();
                         }
                         $editorAdded = true;
                     }
                 }
                 if (!$editorAdded) {
                     $receiverAddress = $journal->getSetting('contactEmail');
                     $receiverName = $journal->getSetting('contactName');
                 }
             }
             $addParamArray = array('editorialContactName' => $receiverName, 'authorName' => $user->getFullName());
             break;
         case 'PROOFREAD_REQUEST':
             $eventType = ARTICLE_EMAIL_PROOFREAD_NOTIFY_PROOFREADER;
             $signoffType = 'SIGNOFF_PROOFREADING_PROOFREADER';
             $setDateField = 'setDateNotified';
             $nullifyDateFields = array('setDateUnderway', 'setDateCompleted', 'setDateAcknowledged');
             $receiver = $sectionEditorSubmission->getUserBySignoffType($signoffType);
             if (!isset($receiver)) {
                 return true;
//.........这里部分代码省略.........
开发者ID:ramonsodoma,项目名称:ojs,代码行数:101,代码来源:ProofreaderAction.inc.php


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