當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ArticleMailTemplate::toAssignedEditingSectionEditors方法代碼示例

本文整理匯總了PHP中ArticleMailTemplate::toAssignedEditingSectionEditors方法的典型用法代碼示例。如果您正苦於以下問題:PHP ArticleMailTemplate::toAssignedEditingSectionEditors方法的具體用法?PHP ArticleMailTemplate::toAssignedEditingSectionEditors怎麽用?PHP ArticleMailTemplate::toAssignedEditingSectionEditors使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ArticleMailTemplate的用法示例。


在下文中一共展示了ArticleMailTemplate::toAssignedEditingSectionEditors方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: 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

示例2: completeFinalCopyedit

 /**
  * Copyeditor completes final copyedit.
  * @param $copyeditorSubmission object
  * @param $send boolean
  * @param $request object
  */
 function completeFinalCopyedit($copyeditorSubmission, $send, $request)
 {
     $copyeditorSubmissionDao =& DAORegistry::getDAO('CopyeditorSubmissionDAO');
     $signoffDao =& DAORegistry::getDAO('SignoffDAO');
     $userDao =& DAORegistry::getDAO('UserDAO');
     $journal =& $request->getJournal();
     $finalSignoff = $signoffDao->build('SIGNOFF_COPYEDITING_FINAL', ASSOC_TYPE_ARTICLE, $copyeditorSubmission->getId());
     if ($finalSignoff->getDateCompleted() != null) {
         return true;
     }
     $user =& $request->getUser();
     import('classes.mail.ArticleMailTemplate');
     $email = new ArticleMailTemplate($copyeditorSubmission, 'COPYEDIT_FINAL_COMPLETE');
     $editAssignments = $copyeditorSubmission->getEditAssignments();
     if (!$email->isEnabled() || $send && !$email->hasErrors()) {
         HookRegistry::call('CopyeditorAction::completeFinalCopyedit', array(&$copyeditorSubmission, &$editAssignments, &$email));
         if ($email->isEnabled()) {
             $email->send($request);
         }
         $finalSignoff->setDateCompleted(Core::getCurrentDate());
         $signoffDao->updateObject($finalSignoff);
         if ($copyEdFile = $copyeditorSubmission->getFileBySignoffType('SIGNOFF_COPYEDITING_FINAL')) {
             // Set initial layout version to final copyedit version
             $layoutSignoff = $signoffDao->build('SIGNOFF_LAYOUT', ASSOC_TYPE_ARTICLE, $copyeditorSubmission->getId());
             if (!$layoutSignoff->getFileId()) {
                 import('classes.file.ArticleFileManager');
                 $articleFileManager = new ArticleFileManager($copyeditorSubmission->getId());
                 if ($layoutFileId = $articleFileManager->copyToLayoutFile($copyEdFile->getFileId(), $copyEdFile->getRevision())) {
                     $layoutSignoff->setFileId($layoutFileId);
                     $signoffDao->updateObject($layoutSignoff);
                 }
             }
         }
         // Add log entry
         import('classes.article.log.ArticleLog');
         import('classes.article.log.ArticleEventLogEntry');
         ArticleLog::logEvent($request, $copyeditorSubmission, ARTICLE_LOG_COPYEDIT_FINAL, 'log.copyedit.finalEditComplete', array('copyeditorName' => $user->getFullName()));
         return true;
     } else {
         if (!$request->getUserVar('continued')) {
             $assignedSectionEditors = $email->toAssignedEditingSectionEditors($copyeditorSubmission->getId());
             $assignedEditors = $email->ccAssignedEditors($copyeditorSubmission->getId());
             if (empty($assignedSectionEditors) && empty($assignedEditors)) {
                 $email->addRecipient($journal->getSetting('contactEmail'), $journal->getSetting('contactName'));
                 $paramArray = array('editorialContactName' => $journal->getSetting('contactName'), 'copyeditorName' => $user->getFullName());
             } else {
                 $editorialContact = array_shift($assignedSectionEditors);
                 if (!$editorialContact) {
                     $editorialContact = array_shift($assignedEditors);
                 }
                 $paramArray = array('editorialContactName' => $editorialContact->getEditorFullName(), 'copyeditorName' => $user->getFullName());
             }
             $email->assignParams($paramArray);
         }
         $email->displayEditForm($request->url(null, 'copyeditor', 'completeFinalCopyedit', 'send'), array('articleId' => $copyeditorSubmission->getId()));
         return false;
     }
 }
開發者ID:ramonsodoma,項目名稱:ojs,代碼行數:64,代碼來源:CopyeditorAction.inc.php

示例3: completeLayoutEditing

 /**
  * Marks layout assignment as completed.
  * @param $submission object
  * @param $send boolean
  */
 function completeLayoutEditing($submission, $send = false)
 {
     $signoffDao =& DAORegistry::getDAO('SignoffDAO');
     $userDao =& DAORegistry::getDAO('UserDAO');
     $journal =& Request::getJournal();
     $layoutSignoff = $signoffDao->build('SIGNOFF_LAYOUT', ASSOC_TYPE_ARTICLE, $submission->getArticleId());
     if ($layoutSignoff->getDateCompleted() != null) {
         return true;
     }
     import('classes.mail.ArticleMailTemplate');
     $email = new ArticleMailTemplate($submission, 'LAYOUT_COMPLETE');
     $editAssignments =& $submission->getEditAssignments();
     if (empty($editAssignments)) {
         return;
     }
     if (!$email->isEnabled() || $send && !$email->hasErrors()) {
         HookRegistry::call('LayoutEditorAction::completeLayoutEditing', array(&$submission, &$editAssignments, &$email));
         if ($email->isEnabled()) {
             $email->setAssoc(ARTICLE_EMAIL_LAYOUT_NOTIFY_COMPLETE, ARTICLE_EMAIL_TYPE_LAYOUT, $layoutSignoff->getId());
             $email->send();
         }
         $layoutSignoff->setDateCompleted(Core::getCurrentDate());
         $signoffDao->updateObject($layoutSignoff);
         // Add log entry
         $user =& Request::getUser();
         import('classes.article.log.ArticleLog');
         import('classes.article.log.ArticleEventLogEntry');
         ArticleLog::logEvent($submission->getArticleId(), ARTICLE_LOG_LAYOUT_COMPLETE, ARTICLE_LOG_TYPE_LAYOUT, $user->getId(), 'log.layout.layoutEditComplete', array('editorName' => $user->getFullName(), 'articleId' => $submission->getArticleId()));
         return true;
     } else {
         $user =& Request::getUser();
         if (!Request::getUserVar('continued')) {
             $assignedSectionEditors = $email->toAssignedEditingSectionEditors($submission->getArticleId());
             $assignedEditors = $email->ccAssignedEditors($submission->getArticleId());
             if (empty($assignedSectionEditors) && empty($assignedEditors)) {
                 $email->addRecipient($journal->getSetting('contactEmail'), $journal->getSetting('contactName'));
                 $editorialContactName = $journal->getSetting('contactName');
             } else {
                 $editorialContact = array_shift($assignedSectionEditors);
                 if (!$editorialContact) {
                     $editorialContact = array_shift($assignedEditors);
                 }
                 $editorialContactName = $editorialContact->getEditorFullName();
             }
             $paramArray = array('editorialContactName' => $editorialContactName, 'layoutEditorName' => $user->getFullName());
             $email->assignParams($paramArray);
         }
         $email->displayEditForm(Request::url(null, 'layoutEditor', 'completeAssignment', 'send'), array('articleId' => $submission->getArticleId()));
         return false;
     }
 }
開發者ID:ingmarschuster,項目名稱:MindResearchRepository,代碼行數:56,代碼來源:LayoutEditorAction.inc.php


注:本文中的ArticleMailTemplate::toAssignedEditingSectionEditors方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。