當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。