function fetch($request)
{
$context = $request->getContext();
$templateMgr = TemplateManager::getManager($request);
$templateMgr->assign(array('submissionId' => $this->getSubmission()->getId(), 'stageId' => $this->getStageId(), 'formParams' => $this->getFormParams(), 'context' => $context));
$journalSettingsDao = DAORegistry::getDAO('JournalSettingsDAO');
$templateMgr->assign('issueOptions', $this->getIssueOptions($context));
$publishedArticle = $this->getPublishedArticle();
if ($publishedArticle) {
$templateMgr->assign('publishedArticle', $publishedArticle);
$issueDao = DAORegistry::getDAO('IssueDAO');
$issue = $issueDao->getById($publishedArticle->getIssueId());
if ($issue) {
$templateMgr->assign('issueAccess', $issue->getAccessStatus());
$templateMgr->assign('accessOptions', array(ARTICLE_ACCESS_ISSUE_DEFAULT => __('editor.issues.default'), ARTICLE_ACCESS_OPEN => __('editor.issues.open')));
}
}
// include payment information
// Set up required Payment Related Information
import('classes.payment.ojs.OJSPaymentManager');
$paymentManager = new OJSPaymentManager($request);
$completedPaymentDao = DAORegistry::getDAO('OJSCompletedPaymentDAO');
$publicationFeeEnabled = $paymentManager->publicationEnabled();
$templateMgr->assign('publicationFeeEnabled', $publicationFeeEnabled);
if ($publicationFeeEnabled) {
$templateMgr->assign('publicationPayment', $completedPaymentDao->getPublicationCompletedPayment($context->getId(), $this->getSubission()->getId()));
}
$templateMgr->assign('submission', $this->getSubmission());
return parent::fetch($request);
}