本文整理汇总了PHP中ArticleSearchIndex::deleteTextIndex方法的典型用法代码示例。如果您正苦于以下问题:PHP ArticleSearchIndex::deleteTextIndex方法的具体用法?PHP ArticleSearchIndex::deleteTextIndex怎么用?PHP ArticleSearchIndex::deleteTextIndex使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ArticleSearchIndex
的用法示例。
在下文中一共展示了ArticleSearchIndex::deleteTextIndex方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: removeFileIndex
/**
* @copydoc PKPManageFileApiHandler::removeFileIndex()
*/
function removeFileIndex($submission, $submissionFile)
{
// update the submission's search index if this was a proof file
if ($submissionFile->getFileStage() == SUBMISSION_FILE_PROOF) {
import('lib.pkp.classes.search.SubmissionSearch');
import('classes.search.ArticleSearchIndex');
ArticleSearchIndex::deleteTextIndex($submission->getId(), SUBMISSION_SEARCH_GALLEY_FILE, $submissionFile->getFileId());
}
}
示例2: deleteSuppFile
/**
* Delete a supplementary file.
* @param $article object
* @param $suppFileId int
*/
function deleteSuppFile($article, $suppFileId)
{
import('classes.file.ArticleFileManager');
$suppFileDao =& DAORegistry::getDAO('SuppFileDAO');
$suppFile =& $suppFileDao->getSuppFile($suppFileId, $article->getId());
if (isset($suppFile) && !HookRegistry::call('LayoutEditorAction::deleteSuppFile', array(&$article, &$suppFile))) {
if ($suppFile->getFileId()) {
$articleFileManager = new ArticleFileManager($article->getId());
$articleFileManager->deleteFile($suppFile->getFileId());
import('classes.search.ArticleSearchIndex');
ArticleSearchIndex::deleteTextIndex($article->getId(), ARTICLE_SEARCH_SUPPLEMENTARY_FILE, $suppFile->getFileId());
}
$suppFileDao->deleteSuppFile($suppFile);
}
}