当前位置: 首页>>代码示例>>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;未经允许,请勿转载。