fetch() public method

See also: Form::fetch()
public fetch ( $request )
 /**
  * @see Form::fetch()
  */
 function fetch($request)
 {
     $templateMgr = TemplateManager::getManager($request);
     $context = $this->request->getContext();
     $reviewAssignment = $this->getReviewAssignment();
     $reviewerGuidelines = $context->getLocalizedSetting($reviewAssignment->getStageId() == WORKFLOW_STAGE_ID_INTERNAL_REVIEW ? 'internalReviewGuidelines' : 'reviewGuidelines');
     if (empty($reviewerGuidelines)) {
         $reviewerGuidelines = __('reviewer.submission.noGuidelines');
     }
     $templateMgr->assign('reviewerGuidelines', $reviewerGuidelines);
     return parent::fetch($request);
 }
 /**
  * @see Form::fetch()
  */
 function fetch($request)
 {
     $templateMgr = TemplateManager::getManager($request);
     $context = $request->getContext();
     // Add submission parameters.
     $submission = $this->getReviewerSubmission();
     $templateMgr->assign('completedSteps', $submission->getStatus());
     $templateMgr->assign('competingInterestsText', $submission->getCompetingInterests());
     // Add review assignment.
     $reviewAssignmentDao = DAORegistry::getDAO('ReviewAssignmentDAO');
     $reviewAssignment = $reviewAssignmentDao->getById($submission->getReviewId());
     $templateMgr->assign('reviewAssignment', $reviewAssignment);
     // Add reviewer request text.
     $templateMgr->assign('reviewerRequest', __('reviewer.step1.requestBoilerplate'));
     //
     // Assign the link actions
     //
     import('lib.pkp.classes.linkAction.request.AjaxModal');
     import('lib.pkp.classes.linkAction.request.ConfirmationModal');
     // "View metadata" action.
     import('lib.pkp.controllers.modals.submissionMetadata.linkAction.ReviewerViewMetadataLinkAction');
     $viewMetadataLinkAction = new ReviewerViewMetadataLinkAction($request, $reviewAssignment->getSubmissionId(), $reviewAssignment->getId());
     $templateMgr->assign('viewMetadataAction', $viewMetadataLinkAction);
     // include the confirmation modal for competing interests if the context has them.
     if ($context->getLocalizedSetting('competingInterests') != '') {
         import('lib.pkp.controllers.confirmationModal.linkAction.ViewCompetingInterestGuidelinesLinkAction');
         $competingInterestsAction = new ViewCompetingInterestGuidelinesLinkAction($request);
         $templateMgr->assign('competingInterestsAction', $competingInterestsAction);
     }
     // Instantiate the view review guidelines confirmation modal.
     $aboutDueDateAction = new LinkAction('viewReviewGuidelines', new ConfirmationModal(__('reviewer.aboutDueDates.text'), __('reviewer.aboutDueDates'), 'modal_information', null, '', false), __('reviewer.aboutDueDates'));
     $templateMgr->assign('aboutDueDatesAction', $aboutDueDateAction);
     import('lib.pkp.classes.linkAction.request.AjaxModal');
     $declineReviewLinkAction = new LinkAction('declineReview', new AjaxModal($request->url(null, null, 'showDeclineReview', $reviewAssignment->getSubmissionId()), __('reviewer.submission.declineReview')));
     $templateMgr->assign('declineReviewAction', $declineReviewLinkAction);
     return parent::fetch($request);
 }
 /**
  * @see Form::fetch()
  */
 function fetch($request)
 {
     $templateMgr = TemplateManager::getManager($request);
     $reviewAssignment = $this->getReviewAssignment();
     // Assign the objects and data to the template.
     $context = $this->request->getContext();
     $templateMgr->assign(array('reviewAssignment' => $reviewAssignment, 'reviewRoundId' => $reviewAssignment->getReviewRoundId(), 'reviewerRecommendationOptions' => ReviewAssignment::getReviewerRecommendationOptions()));
     if ($reviewAssignment->getReviewFormId()) {
         // Get the review form components
         $reviewFormElementDao = DAORegistry::getDAO('ReviewFormElementDAO');
         $reviewFormResponseDao = DAORegistry::getDAO('ReviewFormResponseDAO');
         $reviewFormDao = DAORegistry::getDAO('ReviewFormDAO');
         $templateMgr->assign(array('reviewForm' => $reviewFormDao->getById($reviewAssignment->getReviewFormId(), Application::getContextAssocType(), $context->getId()), 'reviewFormElements' => $reviewFormElementDao->getByReviewFormId($reviewAssignment->getReviewFormId()), 'reviewFormResponses' => $reviewFormResponseDao->getReviewReviewFormResponseValues($reviewAssignment->getId()), 'disabled' => isset($reviewAssignment) && $reviewAssignment->getDateCompleted() != null));
     }
     //
     // Assign the link actions
     //
     import('lib.pkp.controllers.confirmationModal.linkAction.ViewReviewGuidelinesLinkAction');
     $viewReviewGuidelinesAction = new ViewReviewGuidelinesLinkAction($request, $reviewAssignment->getStageId());
     if ($viewReviewGuidelinesAction->getGuidelines()) {
         $templateMgr->assign('viewGuidelinesAction', $viewReviewGuidelinesAction);
     }
     return parent::fetch($request);
 }
 /**
  * @see Form::fetch()
  */
 function fetch($request)
 {
     $templateMgr = TemplateManager::getManager($request);
     $reviewAssignment = $this->getReviewAssignment();
     $reviewRoundId = $reviewAssignment->getReviewRoundId();
     // Assign the objects and data to the template.
     $context = $this->request->getContext();
     $templateMgr->assign('reviewAssignment', $reviewAssignment);
     $templateMgr->assign('reviewRoundId', $reviewRoundId);
     // Include the review recommendation options on the form.
     $templateMgr->assign_by_ref('reviewerRecommendationOptions', ReviewAssignment::getReviewerRecommendationOptions());
     if ($reviewAssignment->getReviewFormId()) {
         // Get the review form components
         $reviewFormElementDao = DAORegistry::getDAO('ReviewFormElementDAO');
         $reviewFormElements = $reviewFormElementDao->getByReviewFormId($reviewAssignment->getReviewFormId());
         $reviewFormResponseDao = DAORegistry::getDAO('ReviewFormResponseDAO');
         $reviewFormResponses = $reviewFormResponseDao->getReviewReviewFormResponseValues($reviewAssignment->getId());
         $reviewFormDao = DAORegistry::getDAO('ReviewFormDAO');
         $reviewformid = $reviewAssignment->getReviewFormId();
         $reviewForm = $reviewFormDao->getById($reviewAssignment->getReviewFormId(), Application::getContextAssocType(), $context->getId());
         $templateMgr->assign('reviewForm', $reviewForm);
         $templateMgr->assign('reviewFormElements', $reviewFormElements);
         $templateMgr->assign('reviewFormResponses', $reviewFormResponses);
         $templateMgr->assign('disabled', isset($reviewAssignment) && $reviewAssignment->getDateCompleted() != null);
     }
     //
     // Assign the link actions
     //
     if ($context->getLocalizedSetting('reviewGuidelines')) {
         import('lib.pkp.controllers.confirmationModal.linkAction.ViewReviewGuidelinesLinkAction');
         $viewReviewGuidelinesAction = new ViewReviewGuidelinesLinkAction($request, $reviewAssignment->getStageId());
         $templateMgr->assign('viewGuidelinesAction', $viewReviewGuidelinesAction);
     }
     return parent::fetch($request);
 }