本文整理汇总了PHP中ReviewAssignment::getReviewerId方法的典型用法代码示例。如果您正苦于以下问题:PHP ReviewAssignment::getReviewerId方法的具体用法?PHP ReviewAssignment::getReviewerId怎么用?PHP ReviewAssignment::getReviewerId使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ReviewAssignment
的用法示例。
在下文中一共展示了ReviewAssignment::getReviewerId方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: execute
/**
* Save review assignment
* @param $request PKPRequest
*/
function execute()
{
// Get the list of available files for this review.
$submissionFileDao = DAORegistry::getDAO('SubmissionFileDAO');
import('lib.pkp.classes.submission.SubmissionFile');
// File constants
$submissionFiles = $submissionFileDao->getLatestRevisionsByReviewRound($this->_reviewRound, SUBMISSION_FILE_REVIEW_FILE);
$selectedFiles = (array) $this->getData('selectedFiles');
// Revoke all, then grant selected.
$reviewFilesDao = DAORegistry::getDAO('ReviewFilesDAO');
$reviewFilesDao->revokeByReviewId($this->_reviewAssignment->getId());
foreach ($submissionFiles as $submissionFile) {
if (in_array($submissionFile->getFileId(), $selectedFiles)) {
$reviewFilesDao->grant($this->_reviewAssignment->getId(), $submissionFile->getFileId());
}
}
$reviewAssignmentDao = DAORegistry::getDAO('ReviewAssignmentDAO');
$reviewAssignment = $reviewAssignmentDao->getReviewAssignment($this->_reviewRound->getId(), $this->_reviewAssignment->getReviewerId(), $this->_reviewRound->getRound(), $this->_reviewRound->getStageId());
$reviewAssignment->setDateDue($this->getData('reviewDueDate'));
$reviewAssignment->setDateResponseDue($this->getData('responseDueDate'));
$reviewAssignmentDao->updateObject($reviewAssignment);
}