/** * Store objects with pub ids. * @copydoc Form::execute() */ function execute($request) { parent::execute($request); $pubObject = $this->getPubObject(); if (is_a($pubObject, 'Issue')) { $issueDao = DAORegistry::getDAO('IssueDAO'); $issueDao->updateObject($pubObject); } }
/** * Update proof submission file pub ids. * @param $args array * @param $request PKPRequest * @return JSONMessage JSON object */ function updateIdentifiers($args, $request) { $submissionFile = $this->getAuthorizedContextObject(ASSOC_TYPE_SUBMISSION_FILE); $stageId = $request->getUserVar('stageId'); import('lib.pkp.controllers.tab.pubIds.form.PKPPublicIdentifiersForm'); $form = new PKPPublicIdentifiersForm($submissionFile, $stageId); $form->readInputData(); if ($form->validate($request)) { $form->execute($request); return DAO::getDataChangedEvent($submissionFile->getId()); } else { return new JSONMessage(true, $form->fetch($request)); } }
/** * Update pub ids * @param $args array * @param $request PKPRequest * @return JSONMessage JSON object */ function updateIdentifiers($args, $request) { $submission = $this->getSubmission(); $representationDao = Application::getRepresentationDAO(); $representation = $representationDao->getById($request->getUserVar('representationId'), $submission->getId()); import('lib.pkp.controllers.tab.pubIds.form.PKPPublicIdentifiersForm'); $form = new PKPPublicIdentifiersForm($representation); $form->readInputData(); if ($form->validate($request)) { $form->execute($request); return DAO::getDataChangedEvent(); } else { return new JSONMessage(true, $form->fetch($request)); } }
/** * Update submission pub ids. * @param $args array * @param $request PKPRequest * @return JSONMessage JSON object */ function updateIdentifiers($args, $request) { import('lib.pkp.controllers.tab.pubIds.form.PKPPublicIdentifiersForm'); $submission = $this->getSubmission(); $stageId = $this->getStageId(); $form = new PKPPublicIdentifiersForm($submission, $stageId, array('displayedInContainer' => true)); $form->readInputData(); if ($form->validate($request)) { $form->execute($request); $json = new JSONMessage(); if ($request->getUserVar('displayedInContainer')) { $router = $request->getRouter(); $dispatcher = $router->getDispatcher(); $url = $dispatcher->url($request, ROUTE_COMPONENT, null, $this->_getHandlerClassPath(), 'fetch', null, array('submissionId' => $submission->getId(), 'stageId' => $stageId, 'tabPos' => $this->getTabPosition(), 'hideHelp' => true)); $json->setAdditionalAttributes(array('reloadContainer' => true, 'tabsUrl' => $url)); $json->setContent(true); // prevents modal closure } return $json; } else { return new JSONMessage(true, $form->fetch($request)); } }