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


PHP OutputPage::getProperty方法代码示例

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


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

示例1: addToBodyAttributes

 /**
  * This will be called by OutputPage::headElement when it is creating the
  * "<body>" tag, - adds output property bodyClassName to the existing classes
  * @param OutputPage $out
  * @param array $bodyAttrs
  */
 public function addToBodyAttributes($out, &$bodyAttrs)
 {
     // does nothing by default - used by Special:MobileMenu
     $classes = $out->getProperty('bodyClassName');
     $bodyAttrs['class'] .= ' ' . $classes;
 }
开发者ID:GoProjectOwner,项目名称:mediawiki-extensions-MobileFrontend,代码行数:12,代码来源:SkinMinerva.php

示例2: onOutputPageParserOutput

 /**
  * Propogate if we should create a ToC from ParserOutput -> OutputPage.
  *
  * Its assumed we should create a ToC on the following conditions:
  *  * __NOCOLLABORATIONHUBTOC__ is not on page
  *  * Somebody added parser metadata to the OutputPage (More likely to be a real page)
  *  * The limit report was enabled (More likely to be a real page)
  * These conditions are hacky. Ideally we'd come up with a more
  * robust way of determining if this is really a wikipage.
  *
  * Eventually, the TOC will be output by onOutputPageBeforeHTML hook if this
  * hook signals it is ok.
  *
  * @param $out OutputPage
  * @param $pout ParserOutput
  */
 public static function onOutputPageParserOutput(OutputPage $out, ParserOutput $pout)
 {
     if ($out->getProperty('CollaborationHubSubpage')) {
         // We've already been here, so we can't abort
         // outputting the TOC at this stage.
         wfDebug(__METHOD__ . ' TOC already outputted, possibly incorrectly.');
         return;
     }
     if ($pout->getProperty('nocollaborationhubtoc') !== false) {
         // TOC disabled, mark as done.
         $out->setProperty('CollaborationHubSubpage', true);
     } elseif ($pout->getLimitReportData()) {
         $out->setProperty('CollaborationHubSubpage', "in-progress");
     }
 }
开发者ID:wikimedia,项目名称:mediawiki-extensions-CollaborationKit,代码行数:31,代码来源:CollaborationKit.hooks.php


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