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


PHP ArticleSearchIndex::articleDeleted方法代碼示例

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


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

示例1: deleteSubmission

 /**
  * Delete a submission.
  * @param $args array
  * @param $request PKPRequest
  */
 function deleteSubmission($args, $request)
 {
     $articleId = (int) array_shift($args);
     $this->validate($request, $articleId);
     $authorSubmission =& $this->submission;
     $this->setupTemplate($request, true);
     // If the submission is incomplete, allow the author to delete it.
     if ($authorSubmission->getSubmissionProgress() != 0) {
         import('classes.file.ArticleFileManager');
         $articleFileManager = new ArticleFileManager($articleId);
         $articleFileManager->deleteArticleTree();
         $articleDao =& DAORegistry::getDAO('ArticleDAO');
         $articleDao->deleteArticleById($articleId);
         import('classes.search.ArticleSearchIndex');
         $articleSearchIndex = new ArticleSearchIndex();
         $articleSearchIndex->articleDeleted($articleId);
         $articleSearchIndex->articleChangesFinished();
     }
     $request->redirect(null, null, 'index');
 }
開發者ID:yuricampos,項目名稱:ojs,代碼行數:25,代碼來源:TrackSubmissionHandler.inc.php

示例2: deleteById

 /**
  * @copydoc Submission::deleteById
  */
 function deleteById($submissionId)
 {
     parent::deleteById($submissionId);
     $publishedArticleDao = DAORegistry::getDAO('PublishedArticleDAO');
     $publishedArticleDao->deletePublishedArticleByArticleId($submissionId);
     $articleGalleyDao = DAORegistry::getDAO('ArticleGalleyDAO');
     $articleGalleyDao->deleteByArticleId($submissionId);
     $articleSearchDao = DAORegistry::getDAO('ArticleSearchDAO');
     $articleSearchDao->deleteSubmissionKeywords($submissionId);
     // Delete article citations.
     $citationDao = DAORegistry::getDAO('CitationDAO');
     $citationDao->deleteObjectsByAssocId(ASSOC_TYPE_ARTICLE, $submissionId);
     import('classes.search.ArticleSearchIndex');
     $articleSearchIndex = new ArticleSearchIndex();
     $articleSearchIndex->articleDeleted($submissionId);
     $articleSearchIndex->articleChangesFinished();
     $this->flushCache();
 }
開發者ID:pkp,項目名稱:ojs,代碼行數:21,代碼來源:ArticleDAO.inc.php

示例3: deleteArticleById

 /**
  * Delete an article by ID.
  * @param $articleId int
  */
 function deleteArticleById($articleId)
 {
     $this->authorDao->deleteAuthorsByArticle($articleId);
     $publishedArticleDao =& DAORegistry::getDAO('PublishedArticleDAO');
     $publishedArticleDao->deletePublishedArticleByArticleId($articleId);
     $commentDao =& DAORegistry::getDAO('CommentDAO');
     $commentDao->deleteBySubmissionId($articleId);
     $noteDao =& DAORegistry::getDAO('NoteDAO');
     $noteDao->deleteByAssoc(ASSOC_TYPE_ARTICLE, $articleId);
     $sectionEditorSubmissionDao =& DAORegistry::getDAO('SectionEditorSubmissionDAO');
     $sectionEditorSubmissionDao->deleteDecisionsByArticle($articleId);
     $sectionEditorSubmissionDao->deleteReviewRoundsByArticle($articleId);
     $reviewAssignmentDao =& DAORegistry::getDAO('ReviewAssignmentDAO');
     $reviewAssignmentDao->deleteBySubmissionId($articleId);
     $editAssignmentDao =& DAORegistry::getDAO('EditAssignmentDAO');
     $editAssignmentDao->deleteEditAssignmentsByArticle($articleId);
     // Delete copyedit, layout, and proofread signoffs
     $signoffDao =& DAORegistry::getDAO('SignoffDAO');
     $copyedInitialSignoffs = $signoffDao->getBySymbolic('SIGNOFF_COPYEDITING_INITIAL', ASSOC_TYPE_ARTICLE, $articleId);
     $copyedAuthorSignoffs = $signoffDao->getBySymbolic('SIGNOFF_COPYEDITING_AUTHOR', ASSOC_TYPE_ARTICLE, $articleId);
     $copyedFinalSignoffs = $signoffDao->getBySymbolic('SIGNOFF_COPYEDITING_FINAL', ASSOC_TYPE_ARTICLE, $articleId);
     $layoutSignoffs = $signoffDao->getBySymbolic('SIGNOFF_LAYOUT', ASSOC_TYPE_ARTICLE, $articleId);
     $proofreadAuthorSignoffs = $signoffDao->getBySymbolic('SIGNOFF_PROOFREADING_AUTHOR', ASSOC_TYPE_ARTICLE, $articleId);
     $proofreadProofreaderSignoffs = $signoffDao->getBySymbolic('SIGNOFF_PROOFREADING_PROOFREADER', ASSOC_TYPE_ARTICLE, $articleId);
     $proofreadLayoutSignoffs = $signoffDao->getBySymbolic('SIGNOFF_PROOFREADING_LAYOUT', ASSOC_TYPE_ARTICLE, $articleId);
     $signoffs = array($copyedInitialSignoffs, $copyedAuthorSignoffs, $copyedFinalSignoffs, $layoutSignoffs, $proofreadAuthorSignoffs, $proofreadProofreaderSignoffs, $proofreadLayoutSignoffs);
     foreach ($signoffs as $signoff) {
         if ($signoff) {
             $signoffDao->deleteObject($signoff);
         }
     }
     $articleCommentDao =& DAORegistry::getDAO('ArticleCommentDAO');
     $articleCommentDao->deleteArticleComments($articleId);
     $articleGalleyDao =& DAORegistry::getDAO('ArticleGalleyDAO');
     $articleGalleyDao->deleteGalleysByArticle($articleId);
     $articleSearchDao =& DAORegistry::getDAO('ArticleSearchDAO');
     $articleSearchDao->deleteArticleKeywords($articleId);
     $articleEventLogDao =& DAORegistry::getDAO('ArticleEventLogDAO');
     $articleEventLogDao->deleteByAssoc(ASSOC_TYPE_ARTICLE, $articleId);
     $articleEmailLogDao =& DAORegistry::getDAO('ArticleEmailLogDAO');
     $articleEmailLogDao->deleteByAssoc(ASSOC_TYPE_ARTICLE, $articleId);
     $notificationDao =& DAORegistry::getDAO('NotificationDAO');
     $notificationDao->deleteByAssoc(ASSOC_TYPE_ARTICLE, $articleId);
     $suppFileDao =& DAORegistry::getDAO('SuppFileDAO');
     $suppFileDao->deleteSuppFilesByArticle($articleId);
     // Delete article files -- first from the filesystem, then from the database
     import('classes.file.ArticleFileManager');
     $articleFileDao =& DAORegistry::getDAO('ArticleFileDAO');
     $articleFiles =& $articleFileDao->getArticleFilesByArticle($articleId);
     $articleFileManager = new ArticleFileManager($articleId);
     foreach ($articleFiles as $articleFile) {
         $articleFileManager->deleteFile($articleFile->getFileId());
     }
     $articleFileDao->deleteArticleFiles($articleId);
     // Delete article citations.
     $citationDao =& DAORegistry::getDAO('CitationDAO');
     $citationDao->deleteObjectsByAssocId(ASSOC_TYPE_ARTICLE, $articleId);
     $this->update('DELETE FROM article_settings WHERE article_id = ?', $articleId);
     $this->update('DELETE FROM articles WHERE article_id = ?', $articleId);
     import('classes.search.ArticleSearchIndex');
     $articleSearchIndex = new ArticleSearchIndex();
     $articleSearchIndex->articleDeleted($articleId);
     $articleSearchIndex->articleChangesFinished();
     $this->flushCache();
 }
開發者ID:farhanabbas1983,項目名稱:ojs-1,代碼行數:69,代碼來源:ArticleDAO.inc.php

示例4: deleteById

 /**
  * Delete an article by ID.
  * @param $articleId int
  */
 function deleteById($articleId)
 {
     parent::deleteById($articleId);
     $publishedArticleDao = DAORegistry::getDAO('PublishedArticleDAO');
     $publishedArticleDao->deletePublishedArticleByArticleId($articleId);
     $articleGalleyDao = DAORegistry::getDAO('ArticleGalleyDAO');
     $articleGalleyDao->deleteGalleysByArticle($articleId);
     $articleSearchDao = DAORegistry::getDAO('ArticleSearchDAO');
     $articleSearchDao->deleteSubmissionKeywords($articleId);
     $commentDao = DAORegistry::getDAO('CommentDAO');
     $commentDao->deleteBySubmissionId($submissionId);
     // Delete article files -- first from the filesystem, then from the database
     import('classes.file.ArticleFileManager');
     $articleFileDao = DAORegistry::getDAO('ArticleFileDAO');
     $articleFiles = $articleFileDao->getArticleFilesByArticle($articleId);
     $articleFileManager = new ArticleFileManager($articleId);
     foreach ($articleFiles as $articleFile) {
         $articleFileManager->deleteFile($articleFile->getFileId());
     }
     $articleFileDao->deleteArticleFiles($articleId);
     // Delete article citations.
     $citationDao = DAORegistry::getDAO('CitationDAO');
     $citationDao->deleteObjectsByAssocId(ASSOC_TYPE_ARTICLE, $articleId);
     import('classes.search.ArticleSearchIndex');
     $articleSearchIndex = new ArticleSearchIndex();
     $articleSearchIndex->articleDeleted($articleId);
     $articleSearchIndex->articleChangesFinished();
     $this->flushCache();
 }
開發者ID:utlib,項目名稱:ojs,代碼行數:33,代碼來源:ArticleDAO.inc.php


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