当前位置: 首页>>代码示例>>PHP>>正文


PHP ParserOutput::getJsConfigVars方法代码示例

本文整理汇总了PHP中ParserOutput::getJsConfigVars方法的典型用法代码示例。如果您正苦于以下问题:PHP ParserOutput::getJsConfigVars方法的具体用法?PHP ParserOutput::getJsConfigVars怎么用?PHP ParserOutput::getJsConfigVars使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ParserOutput的用法示例。


在下文中一共展示了ParserOutput::getJsConfigVars方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: addParserOutputMetadata

 /**
  * Add all metadata associated with a ParserOutput object, but without the actual HTML. This
  * includes categories, language links, ResourceLoader modules, effects of certain magic words,
  * and so on.
  *
  * @since 1.24
  * @param ParserOutput $parserOutput
  */
 public function addParserOutputMetadata($parserOutput)
 {
     $this->mLanguageLinks += $parserOutput->getLanguageLinks();
     $this->addCategoryLinks($parserOutput->getCategories());
     $this->setIndicators($parserOutput->getIndicators());
     $this->mNewSectionLink = $parserOutput->getNewSection();
     $this->mHideNewSectionLink = $parserOutput->getHideNewSection();
     $this->mParseWarnings = $parserOutput->getWarnings();
     if (!$parserOutput->isCacheable()) {
         $this->enableClientCache(false);
     }
     $this->mNoGallery = $parserOutput->getNoGallery();
     $this->mHeadItems = array_merge($this->mHeadItems, $parserOutput->getHeadItems());
     $this->addModules($parserOutput->getModules());
     $this->addModuleScripts($parserOutput->getModuleScripts());
     $this->addModuleStyles($parserOutput->getModuleStyles());
     $this->addJsConfigVars($parserOutput->getJsConfigVars());
     $this->mPreventClickjacking = $this->mPreventClickjacking || $parserOutput->preventClickjacking();
     // Template versioning...
     foreach ((array) $parserOutput->getTemplateIds() as $ns => $dbks) {
         if (isset($this->mTemplateIds[$ns])) {
             $this->mTemplateIds[$ns] = $dbks + $this->mTemplateIds[$ns];
         } else {
             $this->mTemplateIds[$ns] = $dbks;
         }
     }
     // File versioning...
     foreach ((array) $parserOutput->getFileSearchOptions() as $dbk => $data) {
         $this->mImageTimeKeys[$dbk] = $data;
     }
     // Hooks registered in the object
     $parserOutputHooks = $this->getConfig()->get('ParserOutputHooks');
     foreach ($parserOutput->getOutputHooks() as $hookInfo) {
         list($hookName, $data) = $hookInfo;
         if (isset($parserOutputHooks[$hookName])) {
             call_user_func($parserOutputHooks[$hookName], $this, $parserOutput, $data);
         }
     }
     // Link flags are ignored for now, but may in the future be
     // used to mark individual language links.
     $linkFlags = array();
     Hooks::run('LanguageLinks', array($this->getTitle(), &$this->mLanguageLinks, &$linkFlags));
     Hooks::run('OutputPageParserOutput', array(&$this, $parserOutput));
 }
开发者ID:GoProjectOwner,项目名称:mediawiki,代码行数:52,代码来源:OutputPage.php


注:本文中的ParserOutput::getJsConfigVars方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。