當前位置: 首頁>>代碼示例>>PHP>>正文


PHP DAO::getDataChangedEvent方法代碼示例

本文整理匯總了PHP中DAO::getDataChangedEvent方法的典型用法代碼示例。如果您正苦於以下問題:PHP DAO::getDataChangedEvent方法的具體用法?PHP DAO::getDataChangedEvent怎麽用?PHP DAO::getDataChangedEvent使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在DAO的用法示例。


在下文中一共展示了DAO::getDataChangedEvent方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: deleteFile

 /**
  * Delete a file or revision
  * @param $args array
  * @param $request Request
  * @return string a serialized JSON object
  */
 function deleteFile($args, &$request)
 {
     // FIXME: authorize!
     $fileId = (int) $request->getUserVar('fileId');
     $success = false;
     if ($fileId) {
         // Delete all revisions or only one?
         $revision = $request->getUserVar('revision') ? (int) $request->getUserVar('revision') : null;
         // Delete the file/revision but only when it belongs to the authorized monograph
         // and to the right file stage.
         $monograph =& $this->getMonograph();
         $submissionFileDao =& DAORegistry::getDAO('SubmissionFileDAO');
         /* @var $submissionFileDao SubmissionFileDAO */
         if ($revision) {
             $success = (bool) $submissionFileDao->deleteRevisionById($fileId, $revision, $this->getFileStage(), $monograph->getId());
         } else {
             $success = (bool) $submissionFileDao->deleteAllRevisionsById($fileId, $this->getFileStage(), $monograph->getId());
         }
     }
     if ($success) {
         return DAO::getDataChangedEvent($fileId);
     } else {
         $json = new JSON(false);
         return $json->getString();
     }
 }
開發者ID:jerico-dev,項目名稱:omp,代碼行數:32,代碼來源:FileApiHandler.inc.php

示例2: updateIdentifiers

 /**
  * 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));
     }
 }
開發者ID:NateWr,項目名稱:omp,代碼行數:20,代碼來源:ManageFileApiHandler.inc.php

示例3: updateFinalDraftFiles

 /**
  * Save 'manage final draft files' form
  * @param $args array
  * @param $request PKPRequest
  * @return JSONMessage JSON object
  */
 function updateFinalDraftFiles($args, $request)
 {
     $submission = $this->getSubmission();
     import('lib.pkp.controllers.grid.files.final.form.ManageFinalDraftFilesForm');
     $manageFinalDraftFilesForm = new ManageFinalDraftFilesForm($submission->getId());
     $manageFinalDraftFilesForm->readInputData();
     if ($manageFinalDraftFilesForm->validate()) {
         $manageFinalDraftFilesForm->execute($args, $request, $this->getGridCategoryDataElements($request, $this->getStageId()));
         // Let the calling grid reload itself
         return DAO::getDataChangedEvent();
     } else {
         return new JSONMessage(false);
     }
 }
開發者ID:PublishingWithoutWalls,項目名稱:pkp-lib,代碼行數:20,代碼來源:ManageFinalDraftFilesGridHandler.inc.php

示例4: updateProofFiles

 /**
  * Save 'manage proof files' form
  * @param $args array
  * @param $request PKPRequest
  * @return JSONMessage JSON object
  */
 function updateProofFiles($args, $request)
 {
     $submission = $this->getSubmission();
     $representation = $this->getAuthorizedContextObject(ASSOC_TYPE_REPRESENTATION);
     import('lib.pkp.controllers.grid.files.proof.form.ManageProofFilesForm');
     $manageProofFilesForm = new ManageProofFilesForm($submission->getId(), $representation->getId());
     $manageProofFilesForm->readInputData();
     if ($manageProofFilesForm->validate()) {
         $manageProofFilesForm->execute($args, $request, $this->getGridCategoryDataElements($request, $this->getStageId()), SUBMISSION_FILE_PROOF);
         // Let the calling grid reload itself
         return DAO::getDataChangedEvent();
     } else {
         return new JSONMessage(false);
     }
 }
開發者ID:PublishingWithoutWalls,項目名稱:pkp-lib,代碼行數:21,代碼來源:ManageProofFilesGridHandler.inc.php

示例5: approveCopyedit

 /**
  * Approve/disapprove the copyediting file, changing its visibility.
  * @param $args array
  * @param $request PKPRequest
  * @return JSONMessage JSON object
  */
 function approveCopyedit($args, $request)
 {
     $submissionFile = $this->getAuthorizedContextObject(ASSOC_TYPE_SUBMISSION_FILE);
     $submission = $this->getAuthorizedContextObject(ASSOC_TYPE_SUBMISSION);
     if ($submissionFile->getViewable()) {
         // No longer expose the file to be sent to next stage.
         $submissionFile->setViewable(false);
     } else {
         // Expose the file.
         $submissionFile->setViewable(true);
     }
     $submissionFileDao = DAORegistry::getDAO('SubmissionFileDAO');
     $submissionFileDao->updateObject($submissionFile);
     return DAO::getDataChangedEvent($submissionFile->getId());
 }
開發者ID:energylevels,項目名稱:pkp-lib,代碼行數:21,代碼來源:CopyeditingFilesGridHandler.inc.php

示例6: updateReviewFiles

 /**
  * Save 'manage review files' form
  * @param $args array
  * @param $request PKPRequest
  * @return string Serialized JSON object
  */
 function updateReviewFiles($args, &$request)
 {
     $monograph =& $this->getMonograph();
     import('controllers.grid.files.review.form.ManageReviewFilesForm');
     $manageReviewFilesForm = new ManageReviewFilesForm($monograph->getId(), $this->getRequestArg('reviewType'), $this->getRequestArg('round'));
     $manageReviewFilesForm->readInputData();
     if ($manageReviewFilesForm->validate()) {
         $manageReviewFilesForm->execute($args, $request);
         // Let the calling grid reload itself
         return DAO::getDataChangedEvent();
     } else {
         $json = new JSON(false);
         return $json->getString();
     }
 }
開發者ID:jerico-dev,項目名稱:omp,代碼行數:21,代碼來源:SelectableEditorReviewFilesGridHandler.inc.php

示例7: updateQueryNoteFiles

 /**
  * Save 'manage query files' form
  * @param $args array
  * @param $request PKPRequest
  * @return JSONMessage JSON object
  */
 function updateQueryNoteFiles($args, $request)
 {
     $submission = $this->getSubmission();
     $query = $this->getAuthorizedContextObject(ASSOC_TYPE_QUERY);
     import('lib.pkp.controllers.grid.files.query.form.ManageQueryNoteFilesForm');
     $manageQueryNoteFilesForm = new ManageQueryNoteFilesForm($submission->getId(), $query->getId(), $request->getUserVar('noteId'));
     $manageQueryNoteFilesForm->readInputData();
     if ($manageQueryNoteFilesForm->validate()) {
         $manageQueryNoteFilesForm->execute($args, $request, $this->getGridCategoryDataElements($request, $this->getStageId()));
         // Let the calling grid reload itself
         return DAO::getDataChangedEvent();
     } else {
         return new JSONMessage(false);
     }
 }
開發者ID:PublishingWithoutWalls,項目名稱:pkp-lib,代碼行數:21,代碼來源:ManageQueryNoteFilesGridHandler.inc.php

示例8: updateCopyeditFiles

 /**
  * Save 'manage copyedited files' form
  * @param $args array
  * @param $request PKPRequest
  * @return JSONMessage JSON object
  */
 function updateCopyeditFiles($args, $request)
 {
     $submission = $this->getSubmission();
     import('lib.pkp.controllers.grid.files.copyedit.form.ManageCopyeditFilesForm');
     $manageCopyeditFilesForm = new ManageCopyeditFilesForm($submission->getId());
     $manageCopyeditFilesForm->readInputData();
     if ($manageCopyeditFilesForm->validate()) {
         $manageCopyeditFilesForm->execute($args, $request, $this->getGridCategoryDataElements($request, $this->getStageId()));
         $notificationMgr = new NotificationManager();
         $notificationMgr->updateNotification($request, array(NOTIFICATION_TYPE_ASSIGN_COPYEDITOR, NOTIFICATION_TYPE_AWAITING_COPYEDITS), null, ASSOC_TYPE_SUBMISSION, $submission->getId());
         // Let the calling grid reload itself
         return DAO::getDataChangedEvent();
     } else {
         return new JSONMessage(false);
     }
 }
開發者ID:jprk,項目名稱:pkp-lib,代碼行數:22,代碼來源:ManageCopyeditFilesGridHandler.inc.php

示例9: updateReviewFiles

 /**
  * Save 'manage review files' form.
  * @param $args array
  * @param $request PKPRequest
  * @return JSONMessage JSON object
  */
 function updateReviewFiles($args, $request)
 {
     $submission = $this->getSubmission();
     import('lib.pkp.controllers.grid.files.review.form.ManageReviewFilesForm');
     $manageReviewFilesForm = new ManageReviewFilesForm($submission->getId(), $this->getRequestArg('stageId'), $this->getRequestArg('reviewRoundId'));
     $manageReviewFilesForm->readInputData();
     if ($manageReviewFilesForm->validate()) {
         $dataProvider = $this->getDataProvider();
         $manageReviewFilesForm->execute($args, $request, $this->getGridCategoryDataElements($request, $this->getStageId()));
         $this->setupTemplate($request);
         $user = $request->getUser();
         NotificationManager::createTrivialNotification($user->getId(), NOTIFICATION_TYPE_SUCCESS, array('contents' => __('notification.updatedReviewFiles')));
         // Let the calling grid reload itself
         return DAO::getDataChangedEvent();
     } else {
         return new JSONMessage(false);
     }
 }
開發者ID:PublishingWithoutWalls,項目名稱:pkp-lib,代碼行數:24,代碼來源:ManageReviewFilesGridHandler.inc.php

示例10: deleteMedia

 /**
  * Delete a media entry
  * @param $args array
  * @param $request PKPRequest
  * @return JSONMessage JSON object
  */
 function deleteMedia($args, $request)
 {
     // Identify the object to be deleted
     $socialMediaId = (int) $request->getUserVar('socialMediaId');
     $context = $this->getContext();
     $socialMediaDao = DAORegistry::getDAO('SocialMediaDAO');
     $socialMedia = $socialMediaDao->getById($socialMediaId, $context->getId());
     if (isset($socialMedia)) {
         $result = $socialMediaDao->deleteObject($socialMedia);
         if ($result) {
             $currentUser = $request->getUser();
             $notificationMgr = new NotificationManager();
             $notificationMgr->createTrivialNotification($currentUser->getId(), NOTIFICATION_TYPE_SUCCESS, array('contents' => __('notification.removedSocialMedia')));
             return DAO::getDataChangedEvent();
         } else {
             return new JSONMessage(false, __('manager.setup.errorDeletingItem'));
         }
     } else {
         fatalError('Social Media not in current context context.');
     }
 }
開發者ID:mczirfusz,項目名稱:pkp-lib,代碼行數:27,代碼來源:ManageSocialMediaGridHandler.inc.php

示例11: reloadLocalizedDefaultSettings

 /**
  * Reload the default localized settings for the journal
  * @param $args array
  * @param $request object
  */
 function reloadLocalizedDefaultSettings($args, $request)
 {
     // make sure the locale is valid
     $locale = $request->getUserVar('localeToLoad');
     if (!AppLocale::isLocaleValid($locale)) {
         $json = new JSONMessage(false);
         return $json->getString();
     }
     $journal = $request->getJournal();
     $journalSettingsDao = DAORegistry::getDAO('JournalSettingsDAO');
     $journalSettingsDao->reloadLocalizedDefaultSettings($journal->getId(), 'registry/journalSettings.xml', array('indexUrl' => $request->getIndexUrl(), 'journalPath' => $journal->getData('path'), 'primaryLocale' => $journal->getPrimaryLocale(), 'journalName' => $journal->getName($journal->getPrimaryLocale())), $locale);
     // also reload the user group localizable data
     $userGroupDao = DAORegistry::getDAO('UserGroupDAO');
     $userGroupDao->installLocale($locale, $journal->getId());
     return DAO::getDataChangedEvent();
 }
開發者ID:utlib,項目名稱:ojs,代碼行數:21,代碼來源:WebsiteSettingsTabHandler.inc.php

示例12: enableLinkAction

 /**
  * Returns a data changd event to re-enable the link action.  Refactored out of
  *  recordDownload since library files do not have downloads recorded and are in a
  *  different context.
  * @param $args aray
  * @param $request Request
  * @return JSONMessage JSON object
  */
 function enableLinkAction($args, $request)
 {
     return DAO::getDataChangedEvent();
 }
開發者ID:selwyntcy,項目名稱:pkp-lib,代碼行數:12,代碼來源:FileApiHandler.inc.php

示例13: removeArticle

 /**
  * Remove an article from the issue.
  * @param $args array
  * @param $request PKPRequest
  * @return JSONMessage JSON object
  */
 function removeArticle($args, $request)
 {
     $journal = $request->getJournal();
     $articleId = (int) $request->getUserVar('articleId');
     $issue = $this->getAuthorizedContextObject(ASSOC_TYPE_ISSUE);
     $issueDao = DAORegistry::getDAO('IssueDAO');
     $publishedArticleDao = DAORegistry::getDAO('PublishedArticleDAO');
     $article = $publishedArticleDao->getPublishedArticleByArticleId($articleId);
     import('classes.article.ArticleTombstoneManager');
     $articleTombstoneManager = new ArticleTombstoneManager();
     if ($article && $article->getIssueId() == $issue->getId()) {
         if ($issue->getPublished()) {
             $articleTombstoneManager->insertArticleTombstone($article, $journal);
         }
         $article->setStatus(STATUS_QUEUED);
         $article->stampStatusModified();
         // If the article is the only one in the section, delete the section from custom issue ordering
         $sectionId = $article->getSectionId();
         $publishedArticleArray = $publishedArticleDao->getPublishedArticlesBySectionId($sectionId, $issue->getId());
         if (sizeof($publishedArticleArray) == 1) {
             $sectionDao = DAORegistry::getDAO('SectionDAO');
             $sectionDao->deleteCustomSection($issue->getId(), $sectionId);
         }
         $publishedArticleDao->deletePublishedArticleByArticleId($articleId);
         $publishedArticleDao->resequencePublishedArticles($article->getSectionId(), $issue->getId());
         return DAO::getDataChangedEvent();
     }
     // If we've fallen through, it must be a badly-specified article
     return new JSONMessage(false);
 }
開發者ID:slgodoy,項目名稱:ojs,代碼行數:36,代碼來源:TocGridHandler.inc.php

示例14: updateUserGroup

 /**
  * Update user group data on database and grid.
  * @param $args array
  * @param $request PKPRequest
  */
 function updateUserGroup($args, &$request)
 {
     $userGroupForm = $this->_getUserGroupForm($request);
     $userGroupForm->readInputData();
     if ($userGroupForm->validate()) {
         $userGroupForm->execute($request);
         return DAO::getDataChangedEvent($userGroupForm->getUserGroupId());
     } else {
         $json = new JSON(false);
         return $json->getString();
     }
 }
開發者ID:jerico-dev,項目名稱:omp,代碼行數:17,代碼來源:UserGroupGridHandler.inc.php

示例15: signOffFile

 /**
  * Sign off the given file revision.
  * @param $args array
  * @param $request Request
  */
 function signOffFile($args, $request)
 {
     // Retrieve the file to be signed off.
     $fileId = (int) $request->getUserVar('fileId');
     // Make sure that the file revision is in the grid.
     $submissionFiles = $this->getGridDataElements($request);
     if (!isset($submissionFiles[$fileId])) {
         fatalError('Invalid file id!');
     }
     assert(isset($submissionFiles[$fileId]['submissionFile']));
     $submissionFile = $submissionFiles[$fileId]['submissionFile'];
     assert(is_a($submissionFile, 'SubmissionFile'));
     // Retrieve the user.
     $user = $request->getUser();
     // Insert or update the sign off corresponding
     // to this file revision.
     $signoffDao = DAORegistry::getDAO('SignoffDAO');
     /* @var $signoffDao SignoffDAO */
     $signoff = $signoffDao->build($this->getSymbolic(), ASSOC_TYPE_SUBMISSION_FILE, $submissionFile->getFileId(), $user->getId());
     $signoff->setDateCompleted(Core::getCurrentDate());
     $signoffDao->updateObject($signoff);
     $this->setupTemplate($request);
     NotificationManager::createTrivialNotification($user->getId(), NOTIFICATION_TYPE_SUCCESS, array('contents' => __('notification.signedFile')));
     return DAO::getDataChangedEvent($fileId);
 }
開發者ID:doana,項目名稱:pkp-lib,代碼行數:30,代碼來源:FileSignoffGridHandler.inc.php


注:本文中的DAO::getDataChangedEvent方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。