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


PHP LinksUpdate::getTitle方法代碼示例

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


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

示例1: onLinksUpdateComplete

 /**
  * Invalidates the cache for a campaign when any of its dependents are edited. The 'dependents'
  * are tracked by entries in the templatelinks table, which are inserted by using the
  * PageContentSaveComplete hook.
  *
  * This is usually run via the Job Queue mechanism.
  */
 public static function onLinksUpdateComplete(LinksUpdate &$linksupdate)
 {
     if (!$linksupdate->getTitle()->inNamespace(NS_CAMPAIGN)) {
         return true;
     }
     $campaign = new UploadWizardCampaign($linksupdate->getTitle());
     $campaign->invalidateCache();
     return true;
 }
開發者ID:robksawyer,項目名稱:lathe.tools,代碼行數:16,代碼來源:CampaignHooks.php

示例2: onLinksUpdateComplete

 /**
  * @param LinksUpdate $linksUpdate
  * @return bool return true to continue hooks flow
  */
 public static function onLinksUpdateComplete($linksUpdate)
 {
     wfProfileIn(__METHOD__);
     $images = $linksUpdate->getImages();
     $articleId = $linksUpdate->getTitle()->getArticleID();
     if (count($images) === 1) {
         $images = array_keys($images);
         self::buildIndex($articleId, $images);
         wfProfileOut(__METHOD__);
         return true;
     }
     $article = new Article($linksUpdate->getTitle());
     self::buildAndGetIndex($article);
     wfProfileOut(__METHOD__);
     return true;
 }
開發者ID:Tjorriemorrie,項目名稱:app,代碼行數:20,代碼來源:imageServingHelper.class.php

示例3: onLinksUpdateComplete

 /**
  * Insert assessment records after page is saved
  * @param LinksUpdate $linksUpdate
  */
 public static function onLinksUpdateComplete(&$linksUpdate)
 {
     $pOut = $linksUpdate->getParserOutput();
     if ($pOut->getExtensionData('ext-pageassessment-assessmentdata') !== null) {
         $assessmentData = $pOut->getExtensionData('ext-pageassessment-assessmentdata');
     } else {
         // Even if there is no assessment data, we still need to run doUpdates
         // in case any assessment data was deleted from the page.
         $assessmentData = [];
     }
     $title = $linksUpdate->getTitle();
     // In most cases $title will be a talk page, but we want to associate the
     // assessment data with the subject page.
     $subjectTitle = $title->getSubjectPage();
     PageAssessmentsBody::doUpdates($subjectTitle, $assessmentData);
 }
開發者ID:wikimedia,項目名稱:mediawiki-extensions-PageAssessments,代碼行數:20,代碼來源:PageAssessments.hooks.php

示例4: onLinksUpdate

 /**
  * LinksUpdate hook handler - saves a count of h2 elements that occur in the WikiPage
  * @see https://www.mediawiki.org/wiki/Manual:Hooks/LinksUpdate
  *
  * @param LinksUpdate $lu
  * @return bool
  */
 public static function onLinksUpdate(LinksUpdate $lu)
 {
     if ($lu->getTitle()->isTalkPage()) {
         $parserOutput = $lu->getParserOutput();
         $sections = $parserOutput->getSections();
         $numTopics = 0;
         foreach ($sections as $section) {
             if ($section['toclevel'] == 1) {
                 $numTopics += 1;
             }
         }
         if ($numTopics) {
             $lu->mProperties['page_top_level_section_count'] = $numTopics;
         }
     }
     return true;
 }
開發者ID:micha6554,項目名稱:mediawiki-extensions-MobileFrontend,代碼行數:24,代碼來源:MobileFrontend.hooks.php

示例5: onLinksUpdateConstructed

 /**
  * After article was edited and parsed, in case of layer page, save layers to database
  *
  * @since 3.0
  *
  * @param LinksUpdate &$linksUpdate
  *
  * @return true
  */
 public static function onLinksUpdateConstructed(LinksUpdate &$linksUpdate)
 {
     $title = $linksUpdate->getTitle();
     self::processLayersStoreCandidate($linksUpdate->mParserOutput, $title);
     return true;
 }
開發者ID:whysasse,項目名稱:kmwiki,代碼行數:15,代碼來源:Maps.hooks.php

示例6: onLinksUpdate

 /**
  * Modifies ParserOutput
  * @param \LinksUpdate $linksUpdate
  * @return bool
  */
 public static function onLinksUpdate(\LinksUpdate $linksUpdate)
 {
     $linksUpdate->mParserOutput = (new \FlagsController())->modifyParserOutputWithFlags($linksUpdate->getParserOutput(), $linksUpdate->getTitle()->getArticleID());
     return true;
 }
開發者ID:Tjorriemorrie,項目名稱:app,代碼行數:10,代碼來源:Flags.hooks.php

示例7: preventCategorization

 public static function preventCategorization(LinksUpdate $updater)
 {
     $handle = new MessageHandle($updater->getTitle());
     if ($handle->isMessageNamespace() && !$handle->isDoc()) {
         $updater->mCategories = array();
     }
     return true;
 }
開發者ID:HuijiWiki,項目名稱:mediawiki-extensions-Translate,代碼行數:8,代碼來源:TranslateHooks.php


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