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


PHP CommentForm::email方法代码示例

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


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

示例1: email

 /**
  * Email the comment.
  */
 function email()
 {
     $roleDao =& DAORegistry::getDAO('RoleDAO');
     $userDao =& DAORegistry::getDAO('UserDAO');
     $journal =& Request::getJournal();
     // Create list of recipients:
     // Layout comments are to be sent to the editor or layout editor;
     // the opposite of whomever posted the comment.
     $recipients = array();
     if ($this->roleId == ROLE_ID_EDITOR || $this->roleId == ROLE_ID_SECTION_EDITOR) {
         // Then add layout editor
         $signoffDao =& DAORegistry::getDAO('SignoffDAO');
         $layoutSignoff = $signoffDao->getBySymbolic('SIGNOFF_LAYOUT', ASSOC_TYPE_ARTICLE, $this->article->getId());
         // Check to ensure that there is a layout editor assigned to this article.
         if ($layoutSignoff != null && $layoutSignoff->getUserId() > 0) {
             $user =& $userDao->getUser($layoutSignoff->getUserId());
             if ($user) {
                 $recipients = array_merge($recipients, array($user->getEmail() => $user->getFullName()));
             }
         }
     } else {
         // Then add editor
         $editAssignmentDao =& DAORegistry::getDAO('EditAssignmentDAO');
         $editAssignments =& $editAssignmentDao->getEditAssignmentsByArticleId($this->article->getId());
         $editorAddresses = array();
         while (!$editAssignments->eof()) {
             $editAssignment =& $editAssignments->next();
             if ($editAssignment->getCanEdit()) {
                 $editorAddresses[$editAssignment->getEditorEmail()] = $editAssignment->getEditorFullName();
             }
             unset($editAssignment);
         }
         // If no editors are currently assigned to this article,
         // send the email to all editors for the journal
         if (empty($editorAddresses)) {
             $editors =& $roleDao->getUsersByRoleId(ROLE_ID_EDITOR, $journal->getId());
             while (!$editors->eof()) {
                 $editor =& $editors->next();
                 $editorAddresses[$editor->getEmail()] = $editor->getFullName();
             }
         }
         $recipients = array_merge($recipients, $editorAddresses);
     }
     parent::email($recipients);
 }
开发者ID:ramonsodoma,项目名称:ojs,代码行数:48,代码来源:LayoutCommentForm.inc.php

示例2: email

 /**
  * Email the comment.
  */
 function email()
 {
     $roleDao =& DAORegistry::getDAO('RoleDAO');
     $userDao =& DAORegistry::getDAO('UserDAO');
     $conference =& Request::getConference();
     // Create list of recipients:
     // Director Decision comments are to be sent to the director or author,
     // the opposite of whomever wrote the comment.
     $recipients = array();
     if ($this->roleId == ROLE_ID_DIRECTOR || $this->roleId == ROLE_ID_TRACK_DIRECTOR) {
         // Then add author
         $user =& $userDao->getUser($this->paper->getUserId());
         if ($user) {
             $recipients = array_merge($recipients, array($user->getEmail() => $user->getFullName()));
         }
     } else {
         // Then add director
         $editAssignmentDao =& DAORegistry::getDAO('EditAssignmentDAO');
         $editAssignments =& $editAssignmentDao->getEditAssignmentsByPaperId($this->paper->getPaperId());
         $directorAddresses = array();
         while (!$editAssignments->eof()) {
             $editAssignment =& $editAssignments->next();
             $directorAddresses[$editAssignment->getDirectorEmail()] = $editAssignment->getDirectorFullName();
         }
         // If no directors are currently assigned to this paper,
         // send the email to all directors for the conference
         if (empty($directorAddresses)) {
             $directors =& $roleDao->getUsersByRoleId(ROLE_ID_DIRECTOR, $conference->getId());
             while (!$directors->eof()) {
                 $director =& $directors->next();
                 $directorAddresses[$director->getEmail()] = $director->getFullName();
             }
         }
         $recipients = array_merge($recipients, $directorAddresses);
     }
     parent::email($recipients);
 }
开发者ID:sedici,项目名称:ocs,代码行数:40,代码来源:DirectorDecisionCommentForm.inc.php

示例3: email

 /**
  * Email the comment.
  */
 function email()
 {
     $roleDao =& DAORegistry::getDAO('RoleDAO');
     $signoffDao =& DAORegistry::getDAO('SignoffDAO');
     $userDao =& DAORegistry::getDAO('UserDAO');
     $journal =& Request::getJournal();
     // Create list of recipients:
     $recipients = array();
     // Proofread comments are to be sent to the editors, layout editor, proofreader, and author,
     // excluding whomever posted the comment.
     // Get editors
     $editAssignmentDao =& DAORegistry::getDAO('EditAssignmentDAO');
     $editAssignments =& $editAssignmentDao->getEditAssignmentsByArticleId($this->article->getId());
     $editorAddresses = array();
     while (!$editAssignments->eof()) {
         $editAssignment =& $editAssignments->next();
         if ($editAssignment->getCanEdit()) {
             $editorAddresses[$editAssignment->getEditorEmail()] = $editAssignment->getEditorFullName();
         }
         unset($editAssignment);
     }
     // If no editors are currently assigned to this article,
     // send the email to all editors for the journal
     if (empty($editorAddresses)) {
         $editors =& $roleDao->getUsersByRoleId(ROLE_ID_EDITOR, $journal->getId());
         while (!$editors->eof()) {
             $editor =& $editors->next();
             $editorAddresses[$editor->getEmail()] = $editor->getFullName();
         }
     }
     // Get layout editor
     $layoutSignoff = $signoffDao->getBySymbolic('SIGNOFF_LAYOUT', ASSOC_TYPE_ARTICLE, $this->article->getId());
     if ($layoutSignoff != null && $layoutSignoff->getUserId() > 0) {
         $layoutEditor =& $userDao->getUser($layoutSignoff->getUserId());
     } else {
         $layoutEditor = null;
     }
     // Get proofreader
     $proofSignoff = $signoffDao->getBySymbolic('SIGNOFF_PROOFREADING_PROOFREADER', ASSOC_TYPE_ARTICLE, $this->article->getId());
     if ($proofSignoff != null && $proofSignoff->getUserId() > 0) {
         $proofreader =& $userDao->getUser($proofSignoff->getUserId());
     } else {
         $proofreader = null;
     }
     // Get author
     $author =& $userDao->getUser($this->article->getUserId());
     // Choose who receives this email
     if ($this->roleId == ROLE_ID_EDITOR || $this->roleId == ROLE_ID_SECTION_EDITOR) {
         // Then add layout editor, proofreader and author
         if ($layoutEditor != null) {
             $recipients = array_merge($recipients, array($layoutEditor->getEmail() => $layoutEditor->getFullName()));
         }
         if ($proofreader != null) {
             $recipients = array_merge($recipients, array($proofreader->getEmail() => $proofreader->getFullName()));
         }
         if (isset($author)) {
             $recipients = array_merge($recipients, array($author->getEmail() => $author->getFullName()));
         }
     } else {
         if ($this->roleId == ROLE_ID_LAYOUT_EDITOR) {
             // Then add editors, proofreader and author
             $recipients = array_merge($recipients, $editorAddresses);
             if ($proofreader != null) {
                 $recipients = array_merge($recipients, array($proofreader->getEmail() => $proofreader->getFullName()));
             }
             if (isset($author)) {
                 $recipients = array_merge($recipients, array($author->getEmail() => $author->getFullName()));
             }
         } else {
             if ($this->roleId == ROLE_ID_PROOFREADER) {
                 // Then add editors, layout editor, and author
                 $recipients = array_merge($recipients, $editorAddresses);
                 if ($layoutEditor != null) {
                     $recipients = array_merge($recipients, array($layoutEditor->getEmail() => $layoutEditor->getFullName()));
                 }
                 if (isset($author)) {
                     $recipients = array_merge($recipients, array($author->getEmail() => $author->getFullName()));
                 }
             } else {
                 // Then add editors, layout editor, and proofreader
                 $recipients = array_merge($recipients, $editorAddresses);
                 if ($layoutEditor != null) {
                     $recipients = array_merge($recipients, array($layoutEditor->getEmail() => $layoutEditor->getFullName()));
                 }
                 if ($proofreader != null) {
                     $recipients = array_merge($recipients, array($proofreader->getEmail() => $proofreader->getFullName()));
                 }
             }
         }
     }
     parent::email($recipients);
 }
开发者ID:ramonsodoma,项目名称:ojs,代码行数:95,代码来源:ProofreadCommentForm.inc.php

示例4: email

 /**
  * Email the comment.
  */
 function email()
 {
     $article = $this->article;
     $roleDao =& DAORegistry::getDAO('RoleDAO');
     $signoffDao =& DAORegistry::getDAO('SignoffDAO');
     $userDao =& DAORegistry::getDAO('UserDAO');
     $journal =& Request::getJournal();
     // Create list of recipients:
     $recipients = array();
     // Copyedit comments are to be sent to the editor, author, and copyeditor,
     // excluding whomever posted the comment.
     $editorAddresses = array();
     $sectionEditorsDao =& DAORegistry::getDAO('SectionEditorsDAO');
     $sectionEditors =& $sectionEditorsDao->getEditorsBySectionId($journal->getId(), $article->getSectionId());
     foreach ($sectionEditors as $sectionEditor) {
         $editorAddresses[$sectionEditor->getEmail()] = $sectionEditor->getFullName();
     }
     // If no editors are currently assigned, send this message to
     // all of the journal's editors.
     if (empty($editorAddresses)) {
         $editors =& $roleDao->getUsersByRoleId(ROLE_ID_EDITOR, $journal->getId());
         while (!$editors->eof()) {
             $editor =& $editors->next();
             $editorAddresses[$editor->getEmail()] = $editor->getFullName();
         }
     }
     // Get copyeditor
     $copySignoff = $signoffDao->getBySymbolic('SIGNOFF_COPYEDITING_INITIAL', ASSOC_TYPE_ARTICLE, $article->getId());
     if ($copySignoff != null && $copySignoff->getUserId() > 0) {
         $copyeditor =& $userDao->getUser($copySignoff->getUserId());
     } else {
         $copyeditor = null;
     }
     // Get author
     $author =& $userDao->getUser($article->getUserId());
     // Choose who receives this email
     if ($this->roleId == ROLE_ID_EDITOR || $this->roleId == ROLE_ID_SECTION_EDITOR) {
         // Then add copyeditor and author
         if ($copyeditor != null) {
             $recipients = array_merge($recipients, array($copyeditor->getEmail() => $copyeditor->getFullName()));
         }
         $recipients = array_merge($recipients, array($author->getEmail() => $author->getFullName()));
     } else {
         if ($this->roleId == ROLE_ID_COPYEDITOR) {
             // Then add editors and author
             $recipients = array_merge($recipients, $editorAddresses);
             if (isset($author)) {
                 $recipients = array_merge($recipients, array($author->getEmail() => $author->getFullName()));
             }
         } else {
             // Then add editors and copyeditor
             $recipients = array_merge($recipients, $editorAddresses);
             if ($copyeditor != null) {
                 $recipients = array_merge($recipients, array($copyeditor->getEmail() => $copyeditor->getFullName()));
             }
         }
     }
     parent::email($recipients);
 }
开发者ID:JovanyJeff,项目名称:hrp,代码行数:62,代码来源:CopyeditCommentForm.inc.php

示例5: email

 /**
  * Email the comment.
  */
 function email()
 {
     $roleDao =& DAORegistry::getDAO('RoleDAO');
     $userDao =& DAORegistry::getDAO('UserDAO');
     $journal =& Request::getJournal();
     // Create list of recipients:
     // Editor Decision comments are to be sent to the editor or author,
     // the opposite of whomever wrote the comment.
     $recipients = array();
     if ($this->roleId == ROLE_ID_EDITOR || $this->roleId == ROLE_ID_SECTION_EDITOR) {
         // Then add author
         $user =& $userDao->getUser($this->article->getUserId());
         if ($user) {
             $recipients = array_merge($recipients, array($user->getEmail() => $user->getFullName()));
         }
     } else {
         // Then add editor
         $editAssignmentDao =& DAORegistry::getDAO('EditAssignmentDAO');
         $editAssignments =& $editAssignmentDao->getEditAssignmentsByArticleId($this->article->getId());
         $editorAddresses = array();
         while (!$editAssignments->eof()) {
             $editAssignment =& $editAssignments->next();
             $editorAddresses[$editAssignment->getEditorEmail()] = $editAssignment->getEditorFullName();
         }
         // If no editors are currently assigned to this article,
         // send the email to all editors for the journal
         if (empty($editorAddresses)) {
             $editors =& $roleDao->getUsersByRoleId(ROLE_ID_EDITOR, $journal->getId());
             while (!$editors->eof()) {
                 $editor =& $editors->next();
                 $editorAddresses[$editor->getEmail()] = $editor->getFullName();
             }
         }
         $recipients = array_merge($recipients, $editorAddresses);
     }
     parent::email($recipients);
 }
开发者ID:ramonsodoma,项目名称:ojs,代码行数:40,代码来源:EditorDecisionCommentForm.inc.php

示例6: email

 /**
  * Email the comment.
  */
 function email()
 {
     $article = $this->article;
     $roleDao =& DAORegistry::getDAO('RoleDAO');
     $userDao =& DAORegistry::getDAO('UserDAO');
     $journal =& Request::getJournal();
     // Create list of recipients:
     $recipients = array();
     // Copyedit comments are to be sent to the editor, author, and copyeditor,
     // excluding whomever posted the comment.
     // Get editors
     $editAssignmentDao =& DAORegistry::getDAO('EditAssignmentDAO');
     $editAssignments =& $editAssignmentDao->getEditAssignmentsByArticleId($article->getArticleId());
     $editAssignments =& $editAssignments->toArray();
     $editorAddresses = array();
     foreach ($editAssignments as $editAssignment) {
         if ($editAssignment->getCanEdit()) {
             $editorAddresses[$editAssignment->getEditorEmail()] = $editAssignment->getEditorFullName();
         }
     }
     // If no editors are currently assigned, send this message to
     // all of the journal's editors.
     if (empty($editorAddresses)) {
         $editors =& $roleDao->getUsersByRoleId(ROLE_ID_EDITOR, $journal->getJournalId());
         while (!$editors->eof()) {
             $editor =& $editors->next();
             $editorAddresses[$editor->getEmail()] = $editor->getFullName();
         }
     }
     // Get copyeditor
     $copyAssignmentDao =& DAORegistry::getDAO('CopyAssignmentDAO');
     $copyAssignment =& $copyAssignmentDao->getCopyAssignmentByArticleId($article->getArticleId());
     if ($copyAssignment != null && $copyAssignment->getCopyeditorId() > 0) {
         $copyeditor =& $userDao->getUser($copyAssignment->getCopyeditorId());
     } else {
         $copyeditor = null;
     }
     // Get author
     $author =& $userDao->getUser($article->getUserId());
     // Choose who receives this email
     if ($this->roleId == ROLE_ID_EDITOR || $this->roleId == ROLE_ID_SECTION_EDITOR) {
         // Then add copyeditor and author
         if ($copyeditor != null) {
             $recipients = array_merge($recipients, array($copyeditor->getEmail() => $copyeditor->getFullName()));
         }
         $recipients = array_merge($recipients, array($author->getEmail() => $author->getFullName()));
     } else {
         if ($this->roleId == ROLE_ID_COPYEDITOR) {
             // Then add editors and author
             $recipients = array_merge($recipients, $editorAddresses);
             if (isset($author)) {
                 $recipients = array_merge($recipients, array($author->getEmail() => $author->getFullName()));
             }
         } else {
             // Then add editors and copyeditor
             $recipients = array_merge($recipients, $editorAddresses);
             if ($copyeditor != null) {
                 $recipients = array_merge($recipients, array($copyeditor->getEmail() => $copyeditor->getFullName()));
             }
         }
     }
     parent::email($recipients);
 }
开发者ID:Jouper,项目名称:jouper,代码行数:66,代码来源:CopyeditCommentForm.inc.php


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